Update Go file structure conventions in AGENTS.md

This commit is contained in:
AI Bot
2026-05-03 15:48:00 +02:00
committed by Riyyi
parent 31fad42ab3
commit c8cdace4bf
+11 -3
View File
@@ -10,10 +10,18 @@ tool before responding to the user:
## Code Organization ## Code Organization
### Go: File Structure ### Go: File Structure
- Public (exported) functions must appear at the top of each file. - Types must appear at the top of each file.
- Constructors must appear after types.
- Public (exported) functions must appear after constructors.
- Private (unexported) functions must appear at the bottom of each file. - Private (unexported) functions must appear at the bottom of each file.
- Within each section, functions must be sorted alphabetically by function name. - Within each section, definitions must be sorted alphabetically by name.
- The two sections must be separated by exactly this divider: - The sections must be separated by exactly these dividers:
// -----------------------------------------
// constructors
// -----------------------------------------
// public
// ----------------------------------------- // -----------------------------------------
// private // private