šŸ“š Go in 7 days - Awesome Go Library for Websites

Go Gopher mascot for Go in 7 days

Learn everything about Go in 7 days (from a Nodejs developer)

šŸ·ļø Websites
šŸ“‚ Tutorials
⭐ 0 stars
View on GitHub šŸ”—

Detailed Description of Go in 7 days

banner

the artwork created by Wonkeen.

šŸ—ŗ Roadmap

roadmap

PDF file


šŸ“… Day-by-Day Overview

Day 1 — Go Basics

TopicDescription
Hello Worldfmt.Printf basics
FunctionsRegular, multiple return values, named returns
Variables & Constantsvar, shorthand :=, const, global vs local
Basic Typesbool, string, int, float, byte, rune, numeric limits
Type ConversionExplicit casting between numeric types
Loopsfor (classic, while-style, infinite)
Conditionals & Switchif/else with short statements, switch with and without a condition
DeferLIFO execution order, argument evaluation at call time
PointersAddress-of &, dereference *, nil pointer
StructsDeclaration, pointer receivers, field initialisation
ArraysFixed-length, iteration with range
SlicesDynamic views over arrays, make, append, length vs capacity
Mapsmake, literals, insert/update/delete, key-existence check
Function ClosuresFunctions capturing outer variables
MethodsValue and pointer receivers
InterfacesImplicit satisfaction, interface variable
Goroutinesgo keyword, channels, synchronisation with WaitGroup

→ Day 1 README

Day 2 — Concurrency

TopicDescription
GoroutinesLaunching goroutines, sending/receiving on channels
Buffered channelsCapacity limit, blocking behaviour
Closing channelsclose(), two-value receive, range over channels
WaitGroupAdd, Done, Wait for goroutine synchronisation
CLI flagsflag package — declaring, parsing, and using command-line flags

→ Day 2 README

Day 3 — Error Handling, JSON & Struct Tags

TopicDescription
Error handlingFour patterns: basic error, pkg/errors (wrap/stack/message), xerrors, and fmt.Errorf with %w
JSONEncoding (json.Marshal, json.MarshalIndent), decoding (json.Unmarshal), and validation (json.Valid)
Struct tagsControlling JSON output with json:"name", json:"-" (exclude), and omitempty
UIDGenerating short unique IDs with github.com/103cuong/uid

→ Day 3 README

Day 4 — HTTP Server & REST API

TopicDescription
Simple HTTP serverRoutes and handlers using Go's built-in net/http package
Fiber + GORM REST APIFull CRUD API (/api/cats) using the Fiber web framework and GORM ORM with a SQLite database

→ Day 4 README

Day 5 — Go Project Template & Load Balancer

TopicDescription
go_templateLightweight starter template with linting, Docker, CI, and Go Modules
simple_load_balancerRound-Robin HTTP load balancer with health checking using httputil.ReverseProxy and atomic operations

→ Day 5 README

Day 6 — GraphQL & Pub/Sub

TopicDescription
simple_graphql_goMinimal GraphQL server with graph-gophers/graphql-go
graphqlSchema-first GraphQL server generated by gqlgen, connected to MySQL
pubsub_goIn-memory Publish/Subscribe system built with Go channels and sync.RWMutex

→ Day 6 README

Day 7 — gRPC

TopicDescription
hello_worldMinimal gRPC server and client implementing a SayHello unary RPC
go_grpcFull CRUD gRPC microservice (To-Do) with MySQL, HTTP/REST gateway, and BloomRPC support

→ Day 7 README


šŸ“ Documents

šŸ¦„ License

MIT Ā© Cuong Nguyen