Golang 在 Debian 上的测试策略
一 基础环境与本地测试
二 分层测试策略
//go:build integration
// +build integration
go test -tags=integration ./...
三 本地与 CI 的 Debian 适配
四 常用命令与目录组织示例
myproject/
├── go.mod
├── main.go
├── main_test.go
└── user/
├── service.go
├── service_test.go
└── service_integration_test.go // //go:build integration