Let’s start with quiz comparing two programs which differ only by single statement. Program C uses constant declaration (source code):
type N int
func main() { const c = 1 var n N = c fmt.Println(n)}
In contrast to many other languages, Go doesn’t have multiple constructs for…
(source code)
package main
import ( "fmt")
type T struct { id int}
func main() { t1 := T{id: 1} t2 := T{id: 2} ts1 :=…
Declaration of struct fields can be enriched by string literal placed afterwards — tag. Tags add meta information used either by…
Programs in Go are made up of packages. Usually package depends on other packages either those built-in into the…