mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-27 02:38:33 +02:00
Collapse dev commands into Principles, reference golang-best-practices for Go style, and consolidate Testing (scoped tests, testify, ldflags).
926 B
926 B
AGENTS.md
Principles
DO NOT run build command.
Documentation
Update package level README.md after making significant changes.
Go Guidelines
- Use
golang-best-practicesskill. - Use
internal/task/task.gofor lifetime management:task.RootTask()for background operationsparent.Subtask()for nested tasksOnFinished()andOnCancel()callbacks for cleanup
- Use
gperr "goutils/errs"to build pretty nested errors:gperr.Multiline()for multiple operation attemptsgperr.NewBuilder()to collect errorsgperr.NewGroup() + group.Go()to collect errors of multiple concurrent operationsgperr.PrependSubject()to prepend subject to errors
- Use
github.com/puzpuzpuz/xsync/v4for lock-free thread safe maps - Use
goutils/synkto retrieve and put byte buffer
Testing
- Prefer scoped tests
- Prefer
testify - Use
-ldflags="-checklinkname=0"