2026-02-20 15:22:57 +00:00
|
|
|
# CLAUDE.md
|
|
|
|
|
|
|
|
|
|
UniFi network controller API client for querying devices, clients, networks, routes, and sites.
|
|
|
|
|
|
|
|
|
|
Module: `forge.lthn.ai/core/go-netops`
|
|
|
|
|
|
|
|
|
|
## Commands
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
go test ./... # run all tests
|
|
|
|
|
go test -race ./... # race detector (required before commit)
|
|
|
|
|
go test -v -run Name ./... # single test
|
|
|
|
|
go vet ./... # vet check
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Standards
|
|
|
|
|
|
|
|
|
|
- UK English
|
|
|
|
|
- `go test -race ./...` and `go vet ./...` must pass before commit
|
|
|
|
|
- Conventional commits: `type(scope): description`
|
|
|
|
|
- Co-Author: `Co-Authored-By: Virgil <virgil@lethean.io>`
|
2026-03-17 08:44:07 +00:00
|
|
|
- Errors must use `log.E()` from `go-log`, never `fmt.Errorf`
|
|
|
|
|
- Config tests must isolate from real `~/.core/config.yaml` via `t.Setenv("HOME", t.TempDir())`
|
2026-02-20 15:22:57 +00:00
|
|
|
|
|
|
|
|
## Docs
|
|
|
|
|
|
|
|
|
|
- `docs/architecture.md` — package structure, key types, design decisions, API patterns
|
|
|
|
|
- `docs/development.md` — prerequisites, build/test, test patterns, coding standards
|
|
|
|
|
- `docs/history.md` — extraction origin, known limitations, future plans
|