Golang 开发工具栈
⬅︎ 返回上层
TOC
其他
- https://awesome-go.com/
- gore: Go REPL
- https://tmc.github.io/json-to-struct/ : JSON 转 Go Struct
- gvm: Go 版本管理器
- update-golang: a script to easily fetch and install new Golang releases with minimum system intrusion
- project-layout: go 项目结构模板
- statik: Embed files into a Go executable
- markers: kubebuilder 里的 marker 注释语法解析工具。
- gods: Go 基本数据结构
- TheAlgorithms/Go: Algorithms and Data Structures implemented in Go
配置
- viper: 支持环境变量,配置文件 (JSON, TOML, YAML, HCL, envfile, Java properties config files),命令行参数。
开发必备
- https://pkg.go.dev
- gopls: an LSP server for Go
- godef: find symbol information in Go source
DAP
- delve: a debugger for the Go
Code Generator
- goimports:
go get golang.org/x/tools/cmd/goimports
. 自动化加入 import,或去除 import 里未使用的包。同时也会自动格式化代码,类似 gofmt。 - gofmt: 格式化代码用
Linter
- golangci-lint: a Go linters aggregator.
- golint: Linter,格式固定唯一,无选项。
- Staticcheck: Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules.
- revive: ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
Cheatsheet
- https://github.com/a8m/golang-cheat-sheet
Logger
模板引擎
- sprig: Useful template functions for Go templates
- gomplate: 虽然不支持 sprig,但提供了等价的丰富的函数库
错误处理
结构化数据处理
JSON
- gjson: JSON parser for Go
CLI
测试
- goconvey: Go testing in the browser. Integrates with
go test
- testify: 提供 assert, require, mock, suit 工具函数
- gomock
Profiling
HTTP
- mux: a request router and dispatcher
- gin: http web 框架
容器
终端 Shell