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

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

net-wait-go utility / library

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

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

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


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


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

Read More → http client server middleware

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


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

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

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

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

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

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

Coding simple tcp chat on GO

An example on simple tcp chat on GO with logic explanation

Read More → tcp server chat

Golang regexp: matching newline

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

GORM: filter entity by linked entity

Task is not that simple, especially with GORM

Read More → gorm sql postgresql

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