New primitives:
- core.ReadAll(reader) — reads all from any reader, closes, returns Result
- core.WriteAll(writer, content) — writes to any writer, closes, returns Result
- core.CloseStream(v) — closes any value implementing io.Closer
Replaced all io.ReadCloser/io.WriteCloser/io.ReadAll type assertions
in fs_test.go and data_test.go with Core primitives.
"io" import is now zero across all test files. 558 tests, 84.5% coverage.
Remaining stdlib imports (all legitimate test infrastructure):
testing, fmt, context, time, sync, embed, io/fs, bytes, gzip, base64
Co-Authored-By: Virgil <virgil@lethean.io>
Options is now a proper struct with New(), Set(), Get(), typed accessors.
Result gains New(), Result(), Get() methods on the struct.
WithOption("key", value) convenience for core.New().
options_test.go: 22 tests passing against the new contract.
Other test files mechanically updated for compilation.
Co-Authored-By: Virgil <virgil@lethean.io>
Move all tests from tests/ to package root for proper coverage.
Fix Fs zero-value: path() and validatePath() default empty root
to "/" so &Fs{} works without New().
New tests: PathGlob, PathIsAbs, CleanPath, Cli.SetOutput,
ServiceShutdown, Core.Context, Fs zero-value, Fs protected
delete, Command lifecycle with implementation, error formatting
branches, PerformAsync completion/no-handler/after-shutdown,
Extract with templates, Embed path traversal.
Coverage: 76.9% → 82.3% (23 test files).
Co-Authored-By: Virgil <virgil@lethean.io>
Move source from go/core/ to root, tests from go/tests/ to tests/.
Module path dappco.re/go/core resolves cleanly — builds and tests pass.
Co-Authored-By: Virgil <virgil@lethean.io>