Featured

GoLand 2019.3 EAP 4 is Out with MongoDB Support and Importing & Handling Known Package Aliases

Get this EAP build via the Toolbox App, download from the website, or use a snap package (for Ubuntu). Or, right in GoLand, select Automatically check updates for Early Access Program in Preferences / Settings | Appearance & Behavior | System Settings | Updates....

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...

Top 25 Editing Features of GoLand IDE – Part 3

Today we publish the last part of the series about the Top 25 Editing Tips. In case you missed the previous articles, you can go back and read part 1 and part 2 before you read this and give your productivity a boost. Let’s see what’s in this article:...

Top 25 editing features of GoLand IDE – part 2

In today’s article, we continue the series about the Top 25 Editing features of the IDE that will boost your productivity. In case you missed it, the previous post can be found here. Navigation between files Navigate to file Navigate between opened files using...

Columbus Golang Users Group

GoLand 2019.2.3 is Out!

Please welcome GoLand 2019.2.3 with a bunch of bug-fixes! Download GoLand 2019.2.3 Update to it via the Toolbox App, go to 2019.2.2 and click Help | Check for Updates, or download a copy from our website. GO-7213, GO-7830, GO-6689 — We’ve fixed several...

Top 25 editing features of GoLand IDE – part 1

Today’s post is the first one in a mini-series of posts looking at the top 25 editing features in GoLand. The best part about these features? They require zero configuration and are all built into the IDE by default, without the need to search for or install any...

Announcing The New Go Store

We are excited to launch the new Go official swag and merch store shipping worldwide. We are even more excited to announce that 100% of the proceeds from the Go store go directly to GoBridge. GoBridge is a non-profit organization focused on building bridges to educate...

New Go 1.13 language features in GoLand 2019.2

Go 1.13 Beta 1 was announced and, with it, some language changes are coming to Go. In this blog post, we’ll see how GoLand 2019.2 supports this new Go version. To learn more about all the new features and changes in GoLand 2019.2, please see our EAP announcement...

GoLand 2019.1 EAP 7: Install any Go SDK right from the IDE

GoLand 2019.1 EAP 7 is out! Get this new EAP build via our Toolbox App, from the website, as a snap package (for Linux), or directly from GoLand – just select Automatically check updates for Early Access Program in Preferences / Settings | Appearance &...

Go Modules in 2019

What a year! 2018 was a great year for the Go ecosystem, with package management as one of our major focuses. In February, we started a community-wide discussion about how to integrate package management directly into the Go toolchain, and in August we delivered the...

Publishing Go Modules

Introduction This post is part 3 in a series. Part 1 — Using Go Modules Part 2 — Migrating To Go Modules Part 3 — Publishing Go Modules (this post) This post discusses how to write and publish modules so other modules can depend on them. Please note:...

The New Go Developer Network

A sense of community flourishes when we come together in person. As handles become names and avatars become faces, the smiles are real and true friendship can grow. There is joy in the sharing of knowledge and celebrating the accomplishments of our friends,...

GoLand 2019.3 EAP 2 is Out!

Get it via the Toolbox App, download from the website, or use a snap package (for Ubuntu). Or, right in GoLand, select Automatically check updates for Early Access Program in Preferences / Settings | Appearance & Behavior | System Settings | Updates. Download...

Refactorings in GoLand – Extract Interface

In today’s article, we will talk about the Extract Interface refactoring, a new refactoring available since GoLand 2019.1. This refactoring allows us to take a type and extract all the method definitions that we need, then create a new interface from them. This...

Use internal packages to reduce your public API surface

In the beginning, before the go tool, before Go 1.0, the Go distribution stored the standard library in a subdirectory called pkg/ and the commands which built upon it in cmd/. This wasn’t so much a deliberate taxonomy but a by product of the original make based...

Simple Go project layout with modules

A very common question Go beginners have is "how do I organize my code?". Some of the things folks are wondering about are: How does my repository structure reflect the way users import my code? How do I distribute commands (command-line programs that users can...

Summary of reading: July – September 2019

"HTTP - The Definitive Guide" by David Gourney and Brian Totty et. el. - very thorough reference for the HTTP protocol, including tons of useful information about tangential topics like proxies, tunnels, cookies etc. A shame that this book is so dated (from 2002) - it...

Be wary of functions which take several parameters of the same type

APIs should be easy to use and hard to misuse.— Josh Bloch A good example of a simple looking, but hard to use correctly, API is one which takes two or more parameters of the same type. Let’s compare two function signatures: func Max(a, b int) int func...

Don’t force allocations on the callers of your API

This is a post about performance. Most of the time when talking about the performance of a piece of code the overwhelming advice should be (with apologies to Brendan Gregg) don’t worry about it, yet. However there is one area where I council developers to think...

RSA – theory and implementation

RSA has been a staple of public key cryptography for over 40 years, and is still being used today for some tasks in the newest TLS 1.3 standard. This post describes the theory behind RSA - the math that makes it work, as well as some practical considerations; it also...

The Chinese Remainder Theorem

The Chinese Remainder Theorem (CRT) is very useful in cryptography and other domains. According to Wikipedia, its origin and name come from this riddle in a 3rd century book by a Chinese mathematician: There are certain things whose number is unknown. If we count them...

Go compiler intrinsics

Go allows authors to write functions in assembly if required. This is called a stub or forward declaration. package asm // Add returns the sum of a and b. func Add(a int64, b int64) int64 Here we’re declaring Add, a function which takes two int64‘s and...

AES encryption of files in Go

Nine years ago, I wrote a post on AES encryption in Python using the PyCrypto library. Interestingly, it remains a moderately popular post on my site to this day. Since I've recently been checking out Go's cryptographic libraries, it seemed like a good idea to redo...

Clear is better than clever

This article is based on my GopherCon Singapore 2019 presentation. In the presentation I referenced material from my post on declaring variables and my GolangUK 2017 presentation on SOLID design. For brevity those parts of the talk have been elided from this article....

Gopacket/pcap debugging options

Hello. First off, this is a great community, and I’m sure that’s not by chance. Great job golangbridge group. This is the first time that I have needed to post anything because so many answers are already here. I’m having trouble running one of the...

process manager written in Go

I developed a tool for management process. This tool can kill process, display process tree and info. I will add some useful features. If you are interested please try this :)https://github.com/skanehira/pst https://i.redd.it/49l01scxrpt31.gif submitted by...

When will a map resize ? [complicated]

Please correct me: when a bucket has 8 items, a new one will be created and changed to this full one. This does not trigger the recalculation of all the hascodes of the elements in the map. However, when in average each bucket has more than 6.5 elements, the risze...

Resources for learning Web development with Go

Hello, what resources would you recommend for learning Golang to be ready for a job? I have basic knowledge of OOP languages such as PHP, C# and Java, now I am getting into Golang. I found many free resources, videos, books, articles went thru some of them, got the...