Closed djdv closed 1 year ago
Good names are debatable (and I'm always open to suggestion,) but the documentation has been filled in, tests were written, and examples are now there. It should be better than nothing for any developers who are tying to read or modify the relevant code.
This extends to more packages than just command
.
Unfortunately, pkg.go.dev isn't happy with our repo since we're not yet using tagged releases, so it's lagging behind and showing the old in-progress commits. This is a seperate issue we'll have to tackle later as things stabalize.
Running godoc
locally (or any other documentation program) on the latest commit doesn't have this problem.
/internal/command
needs some explanation on what it is and how it works. Various exported names for functions, etc. could probably be better. Generally it's intended to wrap functions of 2 signatures:func niladic(context.Context, *settingsT) error
andfunc withArgs(context.Context, *settingsT, ...string) error
which are expected to be the main entry to various CLI command endpoints. The test files andfs shutdown
may be understandable examples of how it's used.