A comprehensive guide from installation to advanced patterns. Bilingual — hover or tap any paragraph to reveal Vietnamese translation.
Compiles in seconds, runs at near-C speed with a tiny runtime
Goroutines and channels make concurrent code natural and safe
Strong type system with inference — safety without verbosity
go fmt, go test, go build — batteries included, no config needed
Install Go, set up modules, and write your first program
Cài đặt Go, thiết lập module và viết chương trình đầu tiên
Variables, constants, types, and zero values
Biến, hằng số, kiểu dữ liệu và giá trị mặc định
if/else, for loops, switch, and defer
if/else, vòng lặp for, switch và defer
Multiple returns, closures, variadic functions, and init
Đa giá trị trả về, closure, hàm variadic và init
Arrays, slices, maps, and structs
Mảng, slice, map và struct
Methods, interfaces, and type assertions
Phương thức, interface và type assertion
error type, wrapping, errors.Is/As, and panic/recover
Kiểu error, wrapping, errors.Is/As và panic/recover
Goroutines, channels, select, and sync primitives
Goroutine, channel, select và đồng bộ hóa
Package system, go.mod, and dependency management
Hệ thống gói, go.mod và quản lý dependency
Type parameters, constraints, and generic functions (Go 1.18+)
Tham số kiểu, ràng buộc và hàm generic (Go 1.18+)
fmt, os, net/http, encoding/json, context, and more
fmt, os, net/http, encoding/json, context và nhiều hơn nữa
Unit tests, table-driven tests, and benchmarks
Kiểm thử đơn vị, kiểm thử bảng và benchmark
go fmt, go vet, go test, and golangci-lint
go fmt, go vet, go test và golangci-lint
Go proverbs, patterns, and best practices
Go proverbs, các pattern và thực tiễn tốt nhất