Golang tutorial: This content is for Training Golang:
If you are interested in training contact mohittalniya@gmail.com
Day 1:
- Variable declaration
- Constants
- Derived Data types with
type
keyword - Enums
- Struct and member fields and methods
- DuckTyping with Interfaces
Day 2:
Assignment:
main :
- Create an hrm struct -- employee package
- Employee you pass it will return employee of that type: Factory Pattern with 3 structs we created.
call constructors of 3 structs. and call getDetails for all 3.
https://gobyexample.com/switch
https://yourbasic.org/golang/type-assertion-switch/
Day 3:
- Array and Slices
- Map in golang
- for...range
- make keyword
Day 4:
- goroutines
- channels
- buffered and unbuffered
- communication using channels
- Arrow operator to transfer data
assignment
- pipeline pattern using goroutines
- create a producer thread - write some values to a channel-1 say 1- 50
- create a consumer-1 thread -- consume the values from channel-1 , produce square of those values - put it into new channel-2
- create a consumer-2 thread -- this prints the squared value form the channel-2
Day 5:
- Worker Pool using go routine
- sync package wait group and mutexes
Day 6:
- Functional programming - Function is the first class citizen
Day 7:
- Select operation
- Anonymous function and closures
Assignment
/// Read from One channel and write it into multiple channel /// // 1 2 3 4 5 6 -> ch1 /// bottleneck /// 1 3 4-> ch2 4 5 6 -> ch3
Day 8:
- Decorator for functions
- Simple state machine implementation
Day 9:
- HTTP server using golang
- Gorilla mux for route creation
- REST documentation using go-swagger
- https://golang.org/doc/articles/wiki/
Day 10:
- Structuring projects in golang - https://github.com/golang-standards/project-layout
- creating Microservices
- creating local K8s cluster- https://kind.sigs.k8s.io/docs/user/quick-start/
- Logging using zap
Day 12:
- Microservices-1 : https://github.com/SuperMohit/crypto-coins
Day 11:
- Asynchronous communication with RabbitMQ
- Introducing MongoDB
Day 12:
- gRPC based communication using protobuf https://netflixtechblog.com/practical-api-design-at-netflix-part-1-using-protobuf-fieldmask-35cfdc606518
Linters enabled in the IDE:
Day 14:
https://kubernetes.io/blog/2018/07/09/ipvs-based-in-cluster-load-balancing-deep-dive/ https://github.com/natefinch/lumberjack https://github.com/bitnami-labs/sealed-secrets https://pkg.go.dev/embed https://go.dev/blog/generics-proposal https://pkg.go.dev/reflect