v0.1.0 3b1b6ef

AGENTS.md RawHistoryFolder

kvconf

Stdlib-only Go library: key = value parser, struct decoder, native file watchers and live reload. One package, no dependencies, ever.

Layout

  • parse.go: Parse, ParseBytes, Options, Warning.
  • decode.go: struct tags, cached schema, Decode, Unmarshal.
  • marshal.go: Marshal, Quote.
  • write.go: Set, SetFile, WriteFile.
  • file.go: ReadFile, DefaultPath, Path.
  • watch.go: OS-independent watch loop (targets, symlink chain, stamps, debounce). Backends: watch_linux.go (inotify), watch_kqueue*.go (macOS/BSD), watch_windows.go, watch_poll.go, watch_other.go.
  • live.go: Load, Open, Live.

Rules

  • Standard library only; syscall for the OS APIs, not x/sys.
  • Warnings and errors never contain config values.
  • Keep allocations out of hot paths; check with go test -bench . -benchmem and pprof before and after a change.
  • Tests are table driven. Watch tests run on every backend.

Checks

go vet ./... && go test -race ./...
golangci-lint run ./...
for os in darwin windows freebsd; do GOOS=$os go vet ./...; done
go test -run XXX -fuzz FuzzParse -fuzztime 30s .

CI (GitHub mirror) runs the tests on Linux, macOS and Windows.

source
1# kvconf
2
3Stdlib-only Go library: `key = value` parser, struct decoder, native file
4watchers and live reload. One package, no dependencies, ever.
5
6## Layout
7
8- `parse.go`: `Parse`, `ParseBytes`, `Options`, `Warning`.
9- `decode.go`: struct tags, cached schema, `Decode`, `Unmarshal`.
10- `marshal.go`: `Marshal`, `Quote`.
11- `write.go`: `Set`, `SetFile`, `WriteFile`.
12- `file.go`: `ReadFile`, `DefaultPath`, `Path`.
13- `watch.go`: OS-independent watch loop (targets, symlink chain, stamps,
14  debounce). Backends: `watch_linux.go` (inotify), `watch_kqueue*.go`
15  (macOS/BSD), `watch_windows.go`, `watch_poll.go`, `watch_other.go`.
16- `live.go`: `Load`, `Open`, `Live`.
17
18## Rules
19
20- Standard library only; `syscall` for the OS APIs, not `x/sys`.
21- Warnings and errors never contain config values.
22- Keep allocations out of hot paths; check with
23  `go test -bench . -benchmem` and pprof before and after a change.
24- Tests are table driven. Watch tests run on every backend.
25
26## Checks
27
28```sh
29go vet ./... && go test -race ./...
30golangci-lint run ./...
31for os in darwin windows freebsd; do GOOS=$os go vet ./...; done
32go test -run XXX -fuzz FuzzParse -fuzztime 30s .
33```
34
35CI (GitHub mirror) runs the tests on Linux, macOS and Windows.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 3

↑↓ moveenter openesc close