Go basics
This repository has all-in-one main.go that demos basic data structures, syntax, style and features of go programming language 1.x
# if you want to run it (to make sure it all valid)
go run main.go
you can also try a version in Go playground
In case you want to see similar layout in other language (for side-by-side
comparison):
Reasons
I switch between different languages often.
Main reason I have created this file is to serve as a quick refresher or cheat sheet for go.
Most high-level languages have similar features: variables, common data types, conditional statements, loops, functions.
Yes, there are a ton of cheat sheets in existence:
- some are just lacking examples
- others describe each piece on separate page (just to show ads)
- some are way too long
This is format I believe represent top 95% things I use when writing go code.