Featured

GoLand 2020.1 Reaches Beta!

Releasing this Beta means our Early Access Program is approaching the home stretch. We’ve stopped adding new features and are focusing on polishing everything. The Beta is quite stable in comparison to our Early Access Program builds, but keep in mind there may...

Working with Go Modules – Versioning

Hello again. This is the third, and final, article from our series on Go Modules. In this article, we’ll cover how to version our project and manage the migration to a new major version. In case you missed the previous posts, here’s a list of articles from...

Go, the Go Community, and the Pandemic

Carmen Andoh, Russ Cox, and Steve Francia 25 March 2020 Go always comes second to more basic concerns like personal and family health and safety. Around the world, the past couple months have been terrible, and we are still at the start of this awful pandemic. There...

GoLand 2020.1 with Rich Code Completion Support for go.mod, Support for Macros in Run/Debug Configurations, and More

You can get this EAP build through the Toolbox App, by downloading it from the website, by using a snap package (for Ubuntu), or from right inside GoLand by selecting Automatically check updates for Early Access Program in Preferences / Settings | Appearance &...

Working with Go Modules – Dependency management

In this second article from our series on Go Modules, we’ll cover how to manage project dependencies:. This series of articles is broken down into the following sections: *Coming in future posts. We looked at how to get started with a simple application that has...

Test Driven Development with GoLand

Test-Driven Development, or TDD as it is commonly referred to, is the development process in which tests are written first, then the code to support them is created, and, when every test passes, code is refactored. Let’s have a look at how the unique features of...

GoLand Editing Features You Didn’t Know About

Let’s take a look at what GoLand 2020.1 brings in terms of editing features to help us save time when we have to edit our Go code. We can start with some of the more obvious things, like parameter names. When implementing an interface, parameter names are...

GoLand 2020.1 EAP 4: Support for Environment Variables, and You Can Use GoLand as a Simple Text Editor

You can get this EAP build through the Toolbox App, by downloading it from the website, by using a snap package (for Ubuntu), or from right inside GoLand by selecting Automatically check updates for Early Access Program in Preferences / Settings | Appearance &...

How Visual Studio Code leverages Azure Pipelines Artifact Caching Tasks to improve CI

February 18, 2020 by Ethan Dennis, @erdennis13 and João Moreno, @joaomoreno Visual Studio Code is a large project with lots of moving parts and an active participant list. We have shown how we actively use Azure Pipelines to keep up with good engineering...

Profiling Go Applications and Tests

In today’s blog post, we’ll take a look at the new Profiler features of GoLand. We will split this article into two sections: · General profiler usage in which we’ll cover the common features of the profiler across the various profiler...

GoLand 2019.2 EAP 4: .aappend Postfix Template, Clever Go Modules & dep integration, and improved debugger

Here you are! The fourth early access build is out, and we are hurrying to tell you what we have packed inside for you. Download GoLand 2019.2 EAP 4 Get this new EAP build via the Toolbox App, from the website, or as a snap package (for Linux). Or update right in...

Shell Scripting with GoLand 2019.2

Go developers may rely at times on shell scripts to perform various tasks. In this post, we’ll have a look at the new builtin support for Shell scripting in GoLand 2019.2. First, we need a new shell script file, let’s call it hello.sh. As you have probably...

Custom Data Format: Evolving HTML and CSS language features

February 24, 2020 by Pine Wu, @octref The web evolves and so do its languages. New entities continue to land in HTML and CSS specifications. Custom Elements and Houdini allow users to extend HTML and CSS semantics. Many developers today use programming languages that...

Hiring: Senior Software Engineer Golang at SumUp – Berlin, Germany – €60k – €85k

Salary €60k - €85k • Company Website https://sumup.com/careers/Job DescriptionYou will be a member of the Logistics Squad a small, cross-functional and co-located product team building applications and services that help millions of small businesses...

Working with Errors in Go 1.13

Introduction Go’s treatment of errors as values has served us well over the last decade. Although the standard library’s support for errors has been minimal—just the errors.New and fmt.Errorf functions, which produce errors that contain only a message—the built-in...

Nine years of Go

Introduction Today marks the ninth anniversary of the day we open-sourced our initial sketch of Go. On each anniversary we like to take time to reflect on what has happened over the past year. The past 12 months have been a breakout year for the Go language and...

Go.dev: a new hub for Go developers

Over the last two years, as we’ve spoken with users at companies of all sizes, we’ve heard three questions repeatedly: who else is using Go, what do they use it for, and how can I find useful Go packages? Today we are launching go.dev, a new hub for Go developers, to...

Testing flag parsing in Go programs

April 04, 2020 at 07:24 Tags Go This is a short post about writing tests for Go programs that have command-line flags, and in particular programs where flags are a significant chunk of their functionality (think command-line tools like grep). I'll cover a technique...

go test -v streaming output

The testing package is one of my favourite packages in the Go standard library, not just because of its low noise approach to unit testing, but, over the lifetime of Go, it has received a steady stream of quality of life improvements driven by real world usage. The...

Implementing Raft: Part 3 – Persistence and Optimizations

This is Part 3 in a series of posts describing the Raft distributed consensus algorithm and its complete implementation in Go. Here is a list of posts in the series: In this part we'll complete our basic implementation of Raft, by adding persistence and some...

Are large slices more expensive than smaller ones?

Programmers have a tendency to be superstitious. Particularly, when a programmer hears that copies are expensive, they start too see them everywhere, especially when they learn that, in Go, every assignment is a copy. Consider this code; x is three orders of magnitude...

Implementing Raft: Part 2 – Commands and Log Replication

This is Part 2 in a series of posts describing the Raft distributed consensus algorithm and its complete implementation in Go. Here is a list of posts in the series: In this part, we'll greatly enhance the Raft implementation to actually handle commands submitted by...

Implementing Raft: Part 1 – Elections

This is Part 1 in a series of posts describing the Raft distributed consensus algorithm and its complete implementation in Go. Here is a list of posts in the series: Part 0: Introduction Part 1: Elections (this post) Part 2: Commands and log replication (coming soon)...

The Zen of Go

This article was derived from my GopherCon Israel 2020 presentation. It’s also quite long. If you’d prefer a shorter version, head over to the-zen-of-go.netlify.com. The video isn’t online, yet. I’ll update the post when it is available. How should I write good code?...

Implementing Raft: Part 0 – Introduction

This is the first post in a multi-part series describing the Raft distributed consensus algorithm and its complete implementation in Go. Here is a complete list: Part 0: Introduction (this post) Part 1: Elections (coming soon) Part 2: Commands and log replication...

Graceful shutdown of a TCP server in Go

This post is going to discuss how to gracefully shut down a TCP server in Go. While servers typically never stop running (until the process is killed), in some scenarios - e.g. in tests - it's useful to shut them down in an orderly way. High-level structure of TCP...

[noob] Go documentation server query result

when i run godoc -http=:3000 and i make any query using search input box in doc server running locally, i always get an empty response. all the rest is working fine, all docs are there why it happens that way? thanks updated: solved need to add -index to mage search...

Can I enforce a ‘list’ to be homogeneous?

I'm trying to learn the ropes of how Go manages its data structures without generics. For instance, Go has a 'container/list' package that implements a Linked List. As I suspected, with the empty interface hack, the list is actually heterogeneous. I can tack on an...