07/10/2020

Remote debugging with Delve

Previously we discussed local debugging with Goland IDE. Currently we'll discuss how to remotely debug the program, which is working inside Docker container, with Visual Studio Code and Goland IDE.

Read More → docker debugger delve vscode goland
07/01/2020

Deploy docker swarm from Gitlab CI

Docker container deployment has many advantages over binary deployment. Let's dive into advantages and see how we can implement docker container deployment from Gitlab CI.
Let's talk standard docker can help us. Any docker orchestration tools (Kubernetes, for example) will be observed in future articles.
Read More → docker deploy gitlab ci-cd
06/30/2020

net-wait-go utility / library

Both utility and GO package to wait for port to open (TCP, UDP).
Read More → tcp udp docker
06/29/2020

Minimal Docker image with GO

Let's discuss how the minimal docker image with GO program can be built.
Read More → docker compilation upx ldflags
05/08/2020

Compilation and deploy via SSH in Gitlab CI

Let's take a look to how GO compilation works and use Gitlab CI for that.
Read More → gitlab compilation deploy ssh modules vendor ci-cd
05/02/2020

sync.Map

Let's take a look to sync.Map usage and it's sources.
Read More → sync.map map concurrency
05/02/2020

HTTP

Let's take a look to HTTP tools in GO.

Read More → http client server middleware
04/21/2020

Dependency injection in GO

Let's talk about dependency injection pattern and about dependency management in large programs.
Read More → dependency injection container singleton multiton
04/23/2020

Profiling

GO has rich profiling tools from the very beginning — pprof package and go tool pprof. Let's discuss why profiling is good, how to work with it and what is new here.
Read More → profiling pprof benchmark ab cpu allocation remote
04/09/2020

GO templates

Packages text/template, html/template are part of GO standard library. GO templates are used in many GO-programmed software — docker, kubernetes, helm. Many 3rd party libraries are integrated with GO templates, for example echo. Knowing GO templates syntax is pretty useful. This article consists of text/template package documentation and couple of author's solutions. After describing GO templates syntax we'll dive into text/template и html/template sources.
Read More → templates html text sources
04/07/2020

Filtering by a list of values with GORM

If one has a list of values, for example 1,2,3, to filter data by this this one should use ANY and pq.Array constructions:

Read More → gorm sql postgresql
04/04/2020

Principles of slice type in GO

How to use slices is described in GO blog. Let's take a look to a slice internals.
Read More → slice sources allocation
04/02/2020

Data handling in concurrent programs

In GO we have goroutines functionality out of the box. We can run code in parallel. But in our parallel running code we can work with shared variables. And it is not clear how exactly GO handles such situations
Read More → slice map counter sync atomic channels mutex lock concurrency race
04/02/2020

Principles of map type in GO

The map programming interface in GO described in GO blog. We just need to recall, that map is key-value storage and it should retrieve values by key as fast as possible.
Read More → map sources
04/01/2020

Coding simple tcp chat on GO

An example on simple tcp chat on GO with logic explanation

Read More → tcp server chat
03/31/2020

Golang regexp: matching newline

Why PHP- and JavaScript-like regular expressions work with dot (".") work differently in GO
Read More → regular expressions sources
03/30/2020

GORM: filter entity by linked entity

Task is not that simple, especially with GORM

Read More → gorm sql postgresql
03/24/2020

Why and how to use debugger with GO

Debugger is a very helpful and powerful tool. It can help you to understand what exactly is happening in the code, explore new project, avoid needless debug code changes

Read More → debugger goland