Skip to content

Third-party Libraries ​

Guides for commonly used Go third-party libraries, grouped by what you use them for. Each guide covers installation, typical use cases and code samples.

Authorization ​

  • Casbin — rule-based access control (RBAC/ABAC)
  • JWT — issuing and verifying JSON Web Tokens

Configuration and Data Processing ​

  • Viper — configuration from files, environment variables and flags
  • spf13/cast — safe type conversion between Go types
  • copier — copying values between structs
  • go-ini — reading and writing INI files
  • size — human-readable byte sizes

Services and Plumbing ​

  • DockerAPI — calling the Docker API from Go
  • Wire — compile-time dependency injection
  • gopsutils — system and process information
  • gopher-lua — embedding Lua in Go programs

Math, Images and Utilities ​

  • decimal — arbitrary-precision decimal arithmetic
  • gg — 2D graphics drawing
  • lancet — general-purpose utility functions

Logging, ORM and Validation ​

  • Zap — structured, high-performance logging
  • Gorm — the most widely used Go ORM
  • validator — struct and field validation

Web Development ​

  • Gin — HTTP web framework
  • HttpRouter — fast HTTP router
  • swag — generating Swagger docs from annotations

Golang by www.golangdev.cn · Adapted in part from Golang 中文学习文档 (MIT, © 寒江蓑笠翁)