Jul 3, 2024
go version
in terminal or command line.go mod init <module-name>
).main.go
file in CMD tutorial folder.package main
for the entry point function.func
keyword.fmt
and use them in the main function (e.g., fmt.Println
).go build
and go run
commands.var <name> <type>
or shorthand :=
for inferred type.var intNum int
and printing its value.int
, int8
, int16
, int32
, int64
and their memory considerations.float32
and float64
differences in storage and precision.const
keyword and cannot change once set.const pi = 3.14
.func <name>() { <code> }
.[size]<type>
fixed-length collection.append()
to add elements.map[key-type]value-type
for key-value pairs.*Type
for pointer and &variable
for address.go
keyword.chan
keyword with type.