The idiomatic way is a `const` block, often with a custom type and `iota` for enum-like values. ```go type Status int const ( StatusPending Status = iota StatusRunning StatusDone ) ``` Use plain `const` values for unrelated constants, and `iota` when the constants are a related sequence.
Scanned 9/5/2026
Install to Claude Code
npx -y skills add HoangNguyen0403/agent-skills-standard --skill golang-language --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Golang Language?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-golang-language-agent-skills-standard)More formats (shields.io, HTML) on the badges page.
The idiomatic way is a `const` block, often with a custom type and `iota` for enum-like values.
```go
type Status int
const (
StatusPending Status = iota
StatusRunning
StatusDone
)
```
Use plain `const` values for unrelated constants, and `iota` when the constants are a related sequence.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!