xiaohongshu
xiaohongshu
go-backend-workflow
Goバックエンドのビルド・テスト・Lintワークフロー。「Goビルド」「バックエンドテスト」「golangci-lint」「go mod」「go test」「swagger」などのキーワードで自動適用。
Full skill instructions
Go バックエンドプロジェクトのビルド・テスト・品質管理ワークフロー。
| コマンド | 用途 | 実行時間 |
|---|---|---|
/go-backend:go-build | バイナリビルド | 〜30秒 |
/go-backend:go-test | テスト実行 | 〜1分 |
/go-backend:go-lint | 静的解析 (golangci-lint) | 〜30秒 |
/go-backend:go-run | 開発サーバー起動 | 即時 |
/go-backend:go-tidy | 依存関係整理 | 〜10秒 |
/go-backend:go-swagger | Swagger生成 | 〜20秒 |
コード変更 → go-build(コンパイル確認)
↓ 成功
go-test(テスト実行)
↓ 全パス
go-lint(品質チェック)
↓ 問題なし
コミット・PR
このプラグインは以下の順序でプロジェクトを検出:
make test, make lint 等のターゲットがあれば使用go.mod を探索して直接 go コマンドを実行backend/, server/, api/ 等を探索| 変数 | 説明 | デフォルト |
|---|---|---|
GO_BACKEND_DIR | バックエンドディレクトリ | 自動検出 |
GO_MAIN_PATH | main.go のパス | cmd/server/main.go |
GO_BIN_NAME | 出力バイナリ名 | server |
go: modules disabled by GO111MODULE=off
対処:
export GO111MODULE=on
go mod tidy
golangci-lint: command not found
対処:
brew install golangci-lint
# または
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
swag: command not found
対処:
go install github.com/swaggo/swag/cmd/swag@latest
カバレッジ付きテストの実行:
go test -cover -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
open coverage.html
プロジェクトルートに .golangci.yml を配置することでLintルールをカスタマイズ可能。
推奨設定例:
linters:
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- unused
linters-settings:
errcheck:
check-type-assertions: true
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience