The Adapter was pure boilerplate - every method just delegated to the
package-level generic function. Removing it simplifies the API:
- Delete fsedsl/adapter.go
- Update fs/adapter.go to call fsedsl functions directly
- Update README.md to document direct usage
- Remove adapter tests (now redundant)
Coverage remains at 94.8%.
- Add step-by-step integration guide for other projects
- Document the adapter pattern with complete examples
- Add API reference with tables for constructors and options
- Document Binding struct and Tree operations
- Link to ollie/fs/adapter.go as real-world example
- Add Adapter[Ctx] type that provides all EDSL methods specialized for a context type
- NewAdapter[Ctx]() creates an adapter instance
- Update ollie/fs/edsl.go to use the adapter explicitly
- Update README with adapter-based examples
The adapter makes it explicit that we're building a type-specialized
interface to the generic EDSL library.
- Create fsedsl/ as embedded library with generic types:
- FsNodeDecl[Ctx], Binding[Ctx], NodeOption[Ctx]
- BuildTree[Ctx], GenerateHelp[Ctx]
- Tree, File, FileConfig, SyntheticFileInfo
- Update ollie/fs to use fsedsl via type aliases:
- type FsNodeDecl = fsedsl.FsNodeDecl[HandlerCtx]
- Wrapper functions for constructors and options
- Migrate binding functions to Applier pattern:
- Binding.Applier replaces direct field assignment
- Cleanly separates EDSL mechanics from domain types
- Add replace directive in go.mod for local module
The library can be extracted to a separate repo later by
changing the module path and removing the replace directive.