Articles by tag "Sources"

April 9, 2020

GO Templates: Principles and Usage

GO Templates: Principles and Usage

Packages text/template and html/template are part of the Go standard library. Go templates are used in many Go-programmed software — Docker, Kubernetes, Helm. Many third-party libraries are integrated with Go templates, for example Echo. Knowing Go template syntax is very useful.

This article consists of text/template package documentation and a couple of author’s solutions. After describing Go template syntax, we’ll dive into text/template and html/template sources.

Read More → Templates Html Text Sources
April 4, 2020

Principles of slice type in GO

Principles of slice type in GO

The Go blog describes how to use slices. Let’s take a look at slice internals.

Read More → Slice Allocation Sources
April 2, 2020

Data handling in concurrent programs

Data handling in concurrent programs

In Go, we have goroutines functionality out of the box. We can run code in parallel. However, in our parallel running code we can work with shared variables, and it is not clear how exactly Go handles such situations.

Read More → Map Sources
April 2, 2020

Principles of map type in GO

Principles of map type in GO

The map programming interface in Go is described in the Go blog. We just need to recall that a map is a key-value storage and it should retrieve values by key as fast as possible.

Read More → Map Sources
March 30, 2020

Golang regexp: matching newline

Golang regexp: matching newline

Why regular expressions with dot (".") work differently in Go compared to PHP and JavaScript.

Read More → Regular Expressions Sources