Skip to content

Go Knowledge Path

Vojtech Mašek edited this page Aug 19, 2019 · 2 revisions

Basics

⏳ Estimated Time ⏳

1MD

🗒️ Prerequisites

none

✏️ Description

This skill includes basic knowledge of the Golang language, including all constructs such as for, interface, struct or methods. The individual should have strong knowledge on using types, especially structs, slices and maps.

↪️ Reference

https://tour.golang.org/

https://devhints.io/go

https://github.com/a8m/go-lang-cheat-sheet

💂‍♂️ Principal:

🖊️ Curriculum:

At first, you should make the Tour of Golang til the "Methods", the chapter you should do is “Exercise: Fibonacci closure”.

Test:

After mastering this skill, you should be able to do the following task:

  • Create structure that can hold information about person - name and age.

  • Create function that randomly creates instance of person - selects random name from the map of names and generates random age in the range from 1 to 100.

  • Create function that prints information about person: first line is in a form "Name: [name]", second line is in a form “Age: [age]” in case when person is 18 years old or older, in second case, use “underaged” as the age, third line contains “---” as a delimiter.

  • Main function will generate 10 persons and prints information about them to console using functions created in previous steps.

Abstractions:

⏳ Estimated Time ⏳

2MD

🗒️ Prerequisites

none

✏️ Description

One should understand Golang interfaces and methods (receivers).

↪️ Reference https://tour.golang.org/methods/1

💂‍♂️ Principal: -

Modules:

⏳ Estimated Time ⏳

2MD

🗒️ Prerequisites

none

✏️ Description

The individual should have a knowledge on how to download the libraries using go get, read their documentation and use them in a project. They should also have an understanding of logging, monitoring and such of third party libraries. One should also be able to write such reusable libraries.

↪️ Reference

https://github.com/avelino/awesome-go

💂‍♂️ Principal: -

Testing:

⏳ Estimated Time ⏳

2MD

🗒️ Prerequisites

none

✏️ Description

The individual should understand how to write testable code. He should know different testing techniques used in Go (testing using mocks, testing fixtures, golden files, …)

↪️ Reference

https://www.youtube.com/watch?v=8hQG7QlcLBk

https://medium.com/@povilasve/go-advanced-tips-tricks-a872503ac859

💂‍♂️ Principal:

Configurability:

⏳ Estimated Time ⏳

1MD

🗒️ Prerequisites

none

✏️ Description

An individual should be able to create cloud native application runtime configurations using configuration files, environment variables or combination of both. CLI applications can be also configured by providing flags.

↪️ Reference

https://github.com/spf13/viper

https://github.com/spf13/cobra

https://github.com/urfave/cli

💂‍♂️ Principal: -

Visibility over Service:

⏳ Estimated Time ⏳

3MD

🗒️ Prerequisites

none

✏️ Description

An individual knows how to ensure that service is visible - this involves three items: monitoring, logging and tracing. # Monitoring** is important to make sure that service is alive and is performing as expected. Logging is important for debugging and manual recovery of process that went wrong. **Tracing helps to identify bottlenecks in applications and it also helps to see flow of a data in an application.

↪️ Reference

💂‍♂️ Principal: -

HTTP Communication:

⏳ Estimated Time ⏳

2MD

🗒️ Prerequisites

HTTP Basics

✏️ Description

One should be able to implement HTTP client/server, HTTP reverse proxy and other things related to HTTP.

↪️ Reference

https://echo.labstack.com/guide

💂‍♂️ Principal: -

gRPC Communication:

⏳ Estimated Time ⏳

2MD

🗒️ Prerequisites

gRPC Basics

✏️ Description

One should be able to implement gRPC client/server. Along this, they should be able to provide REST API using gRPC gateway.

↪️ Reference

https://grpc.io/docs/tutorials/basic/go.html

https://github.com/grpc-ecosystem/grpc-gateway

💂‍♂️ Principal: -

Storage - SQL:

⏳ Estimated Time ⏳

2MD

🗒️ Prerequisites Storage Basics

✏️ Description

An individual should have knowledge over libraries which helps store data for persistency in PostgreSQL database. For persistency, GORM is used as a ORM for database PostgreSQL. One should have also knowledge over database migrations.

↪️ Reference

http://doc.gorm.io

💂‍♂️ Principal: -

Storage - NoSQL:

⏳ Estimated Time ⏳

2MD

🗒️ Prerequisites

Storage Basics

✏️ Description

The individual should have a strong knowledge of Why and How of NoSQL data storage in Golang. This includes sample cases where the NoSQL approach should be used as well as best practices The individual should also have knowledge over libraries which helps store data in document databases.

↪️ Reference

https://github.com/mongodb/mongo-go-driver

https://cloud.google.com/storage/docs/

💂‍♂️ Principal: -

Storage - Caching:

⏳ Estimated Time ⏳

2MD

🗒️ Prerequisites

Storage Basics

✏️ Description

The individual should have a strong knowledge of Why and How of Caching in Golang. This includes cases when and when not should caches be used, as well as what levels should be cached and what trade-offs this brings. The individual should have knowledge over libraries which helps to cache data. Redis is in the most cases used for caching.

↪️ Reference

https://github.com/go-redis/redis

💂‍♂️ Principal: -

Concurrency:

⏳ Estimated Time ⏳

3MD

🗒️ Prerequisites

none

✏️ Description

An individual should have a strong knowledge in using goroutines, mutexes, syncmaps etc.

↪️ Reference

https://tour.golang.org/concurrency/1

💂‍♂️ Principal: -

Synchronization:

⏳ Estimated Time ⏳

2MD

🗒️ Prerequisites

none

✏️ Description

One should have knowledge about synchronization of goroutines using channels, buffered channels.

↪️ Reference

https://tour.golang.org/concurrency/1

https://gobyexample.com/channel-synchronization

💂‍♂️ Principal: -

Runtime:

⏳ Estimated Time ⏳

2MD

🗒️ Prerequisites

none

✏️ Description

An individual should understand Golang’s packages useful for runtime. These packages include reflection or profiling (CPU/Memory).

↪️ Reference

https://golang.org/pkg/reflect/

https://golang.org/pkg/runtime/pprof/

💂‍♂️ Principal: -

Clone this wiki locally