golang
Installation
SKILL.md
Go Coding Standards
Basic Principles
One Function, One Responsibility
- If function name connects with "and" or "or", it's a signal to split
- If test cases are needed for each if branch, it's a signal to split
Conditional and Loop Depth Limited to 2 Levels
- Minimize depth using early return whenever possible
- If still heavy, extract into separate functions
Make Function Side Effects Explicit
- Example: If
getUseralso runsupdateLastAccess(), specify it in the function name