This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/config/cursor/rules/golang-style.mdc
T
2026-07-26 11:55:16 +02:00

27 lines
1.0 KiB
Plaintext

---
alwaysApply: false
---
# Go Code Style Rules
- Always run `gofmt` or `goimports` before committing.
- Follow Go naming conventions:
- Exported identifiers: PascalCase.
- Unexported identifiers: camelCase.
- Keep line length <= 100 characters.
- Group standard library imports first, then third-party, then local modules.
- Avoid unnecessary abbreviations in variable names.
- Use `error` as the last return value in functions.
- Prefer `context.Context` as the first argument in long-lived or external-facing funcs.
# Go Code Style Rules
- Always run `gofmt` or `goimports` before committing.
- Follow Go naming conventions:
- Exported identifiers: PascalCase.
- Unexported identifiers: camelCase.
- Keep line length <= 100 characters.
- Group standard library imports first, then third-party, then local modules.
- Avoid unnecessary abbreviations in variable names.
- Use `error` as the last return value in functions.
- Prefer `context.Context` as the first argument in long-lived or external-facing funcs.