Table of Contents
1) Setup & Tooling
2) Language Basics
3) Data Structures
4) Error Handling
5) Concurrency
6) Standard Library Essentials
7) Testing
8) Web & API Development
9) Data & Persistence
10) Architecture & Project Structure
11) Performance & Runtime
12) Build, Deploy, DevOps
Glossary (từ khó hay gặp)
1) Setup & Tooling
Setup & Tooling
Install Go
Go versions
GOROOT & GOPATH
go command
go run
go build
go test
go get
go mod (overview)
go env
go generate
go work (workspace)
Format & Lint
gofmt
goimports
go vet
staticcheck
Lint rules
IDE & Editor
gopls (Go language server)
Debugging
Delve (dlv)
Build tags
CI basics
2) Language Basics
Basics
Package & import
package main
init()
Exported vs unexported
Variables
var & const
:= (short declaration)
Zero value
Type inference
Types
Basic types (int, string, bool...)
Type conversion
Type alias vs defined type
Operators
Control flow
if
switch
for
range
defer
Functions
Parameters & returns
Multiple return values
Named return values
Variadic (...)
Closures
panic & recover
Pointers
& and *
nil
String & []byte
rune & UTF-8
strings.Builder
3) Data Structures
Data Structures
Array
Slice
append
copy
Slicing expressions
len & cap
make vs new
Map
Zero value & nil map
Iteration order
Struct
Methods
Embedding
Struct tags (json, db...)
Interface
Implicit implementation
any / interface{}
Type assertion
Type switch
nil pitfalls
Generics
Type parameters
Constraints
Generic collections
4) Error Handling
Error Handling
error interface
Custom errors
Sentinel errors
Error wrapping (%w)
errors.Is / errors.As
panic vs error
defer for cleanup
5) Concurrency
Concurrency
Goroutine
Channel
Buffered vs unbuffered
close(channel)
range over channel
Directional channels
select
context.Context
WithCancel
WithTimeout
WithDeadline
WithValue
sync package
Mutex
RWMutex
WaitGroup
Once
Cond
atomic
Race condition
Race detector (-race)
Worker pool pattern
errgroup
6) Standard Library Essentials
Standard Library
fmt
time
strings
encoding/json
net/http
HTTP client
HTTP server
Middleware
io
os
context
crypto/tls basics
database/sql
Drivers
Transactions
Prepared statements
7) Testing
Testing
Unit test (testing package)
Table-driven tests
Mocking
Interfaces for mocks
Benchmark
Fuzzing
Coverage
httptest
8) Web & API Development
Web & API
REST API
Routing
Validation
Authentication
JWT
gRPC
Protocol Buffers
Interceptors
Serialization
JSON
OpenAPI/Swagger
Rate limiting
Request logging
9) Data & Persistence
Data & Persistence
SQL
Migrations
Connection pool
ORM
sqlc
ent
gorm
Redis
Caching strategies
10) Architecture & Project Structure
Architecture
Project layout
/cmd
/internal
/pkg
Dependency Injection
Clean Architecture
Repository pattern
Service layer
Usecase
DDD (Domain-Driven Design)
Configuration
env vars
viper
Logging
Observability
Metrics
Tracing
Profiling (pprof)
11) Performance & Runtime
Performance
pprof
Benchmarking
Allocations
Escape analysis
GC (Garbage Collector)
Memory & CPU tuning
12) Build, Deploy, DevOps
Build & Deploy
Cross compile
Docker
systemd service
Release versioning
Secrets management
CI/CD pipelines
Glossary (từ khó hay gặp)
concurrency
/kənˈkɝːənsi/: đồng thời
dependency
/dɪˈpendənsi/: phụ thuộc
tooling
/ˈtuːlɪŋ/: bộ công cụ
workspace
/ˈwɝːkˌspeɪs/: không gian làm việc
observability
/əbˌzɝːvəˈbɪləti/: khả năng quan sát hệ thống
profiling
/ˈproʊfaɪlɪŋ/: đo & phân tích hiệu năng