My Golang Study Handbook
Personal golang exercises from various sources
Each exercise sample a unique behavior and might or might not rely on
techniques already shown before.
How to run each sample code
Enter inside each individual exercise folder and
go run <filename>.go [arguments maybe]
.
A dedicated README.md file might exist sometimes, explaining how to run the
sample otherwise.
What I am studying and what I am not
I am looking at general operations that can be sampled on small snippets.
I am following a meta-structure for multipurpose programming languages creating
sample cases for specific features that such kind of language are supposed to
provide in order to solve common problems that computers should resolve.
In a very simplistic way, i am exploring all possible ways to grab data from the
disk, put it into memory, do some calculations and then put it back into storage.
I am not structuring big brains project configs, there will be other
projects just to do that. Ok advanced examples might get
a bit complex.
I am not into syntax abuse party I may do a little syntax abuse
sometimes, yet all snippets
should be clean and objective, easy to understand.
I am not evangelizing the lang, the lang should evangelize itself.
I am not here to say that one IDE/Editor is the best for the job, pick whatever
you want to punch code against the system.
A roadmap-ish path
Besides following a few
online
courses,
there is no defined path here.
However, I expect a few key techniques to be sampled over those exercises:
- Hello world
- Handle low level (console) user input (interactive, parameters, env vars)
- Control flows (conditionals, loops, functions) and structures
- Basic I/O (files)
- Unit testing and coverage
- Concurrency I (classic mutexes and wait groups)
- Concurrency II (channels)
- Reflection
- Intermediate I/O ('low level' TCP/UDP)
- Database (relational, document, key/value and ORM)
- REST services (echo, fiber, but could be any)
- Service Streams (kafka, nats, mqtt)
- Publish and consume packages/libraries
- Docker plugin (using go-plugin-helpers)
- Kubernetes Controllers and Operators
After that, mostly everything else ends up in reading docs from some library
Study sources
Several links used to understand at least one specific thing resent in the
snippets.