golang-linter

作者: samber

golang-linter — 一个可供AI代理安装的技能。

npx skills add https://github.com/samber/cc-skills-golang --skill golang-linter

来自 samber 的更多技能

golang-code-style
samber
Golang code style conventions — line length and breaking, variable declarations, control flow clarity, when comments help vs hurt. Use when writing or reviewing Go code, asking about style or clarity, or establishing project coding standards. Not for naming conventions (→ See `samber/cc-skills-golang@golang-naming` skill), linter configuration (→ See `samber/cc-skills-golang@golang-lint` skill), or doc comments (→ See `samber/cc-skills-golang@golang-documentation` skill).
developmentcode-review
golang-testing
samber
Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI, or debugging flaky/slow tests. For testify-specific APIs see `samber/cc-skills-golang@golang-stretchr-testify`; for measurement methodology see...
developmenttestingcode-review
golang-design-patterns
samber
Idiomatic Golang design patterns — functional options, constructors, error flow and cascading, resource management and lifecycle, graceful shutdown, resilience, architecture, dependency injection, data handling, streaming, and more. Apply when explicitly choosing between architectural patterns, implementing functional options, designing constructor APIs, setting up graceful shutdown, applying resilience patterns, or asking which idiomatic Go pattern fits a specific problem.
developmentdesigncode-review
golang-error-handling
samber
Idiomatic Golang error handling — creation, wrapping with %w, errors.Is/As, errors.Join, custom error types, sentinel errors, panic/recover, the single handling rule, structured logging with slog, HTTP request logging middleware, and samber/oops for production errors. Built to make logs usable at scale with log aggregation 3rd-party tools. Apply when creating, wrapping, inspecting, or logging errors in Go code. For samber/oops specifics → See `samber/cc-skills-golang@golang-samber-oops`...
developmentcode-review
golang-performance
samber
Golang性能优化模式与方法论——若存在X瓶颈,则应用Y方案。涵盖分配减少、CPU效率、内存布局、GC调优、池化、缓存及热路径优化。适用于性能分析或基准测试已识别瓶颈时,需采用正确优化模式进行修复。亦适用于执行性能代码审查时,提出改进建议或可帮助快速识别性能增益的基准测试。不适用于测量方法论(→...
developmentcode-review
golang-security
samber
Security best practices and vulnerability prevention for Golang. Covers injection (SQL, command, XSS), cryptography, filesystem safety, network security, cookies, secrets management, memory safety, and logging. Apply when writing, reviewing, or auditing Go code for security, or when working on any risky code involving crypto, I/O, secrets management, user input handling, or authentication. Includes configuration of security tools.
securitycode-reviewdevelopment
golang-database
samber
Go数据库访问全面指南——参数化查询、结构体扫描、可空列、事务、隔离级别、SELECT FOR UPDATE、连接池、批处理、上下文传播及迁移工具。适用于编写、审查或调试与PostgreSQL、MariaDB、MySQL或SQLite交互的Golang代码;数据库测试;或关于database/sql、sqlx或pgx的问题。不生成数据库模式或迁移SQL。
developmentdatabase
golang-lint
samber
Golang项目的lint最佳实践与golangci-lint配置——运行linter、配置.golangci.yml、使用nolint指令抑制警告、解读lint输出以及选择linter。适用于配置golangci-lint、询问lint警告或nolint抑制、设置代码质量工具或选择linter时使用。当用户提及golangci-lint、go vet、staticcheck或revive时也可使用。
developmentcode-reviewtesting