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.
The Go blog describes how to use slices. Let’s take a look at slice internals.
Read More → Slice Allocation SourcesIn 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 SourcesThe 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 SourcesWhy regular expressions with dot (".") work differently in Go compared to PHP and JavaScript.
Read More → Regular Expressions Sources