Golang Language
ASecurityIn Go, keep imports in a single `import` block, grouped and automatically formatted with `gofmt` or `goimports`. General structure: ```go import ( "context" "fmt" "github.com/acme/project/internal/service" ) ``` Use these rules: - Standard library imports first - Blank line - Third-party or local project imports after that - Let `goimports` sort and clean them automatically - Avoid unused imports - Prefer one grouped `import (...)` block when there are multiple imports Also: - Use short, lowe...
- 584 stars
- 0 votes
- 0 copies
- 3 views
- Added September 5, 2026
Security analysis
100/100Pro scans all 11 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill golang-language --agent claude-codeAre you the author of Golang Language?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-golang-language-6dd94b69)In Go, keep imports in a single `import` block, grouped and automatically formatted with `gofmt` or `goimports`.
General structure:
```go
import (
"context"
"fmt"
"github.com/acme/project/internal/service"
)
```
Use these rules:
- Standard library imports first
- Blank line
- Third-party or local project imports after that
- Let `goimports` sort and clean them automatically
- Avoid unused imports
- Prefer one grouped `import (...)` block when there are multiple imports
Also:
- Use short, lowercase package names
- Alias imports only when necessary, such as name collisions or clearer intent
- Avoid dot imports except in rare cases like some tests
- Avoid renaming imports without a real reason
In practice, the safest approach is: write the code, then run `goimports` so import order, formatting, and cleanup stay idiomatic.*** End Patch
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.