Commit Graph

5 Commits

Author SHA1 Message Date
Tim Hockin 913a6be647 Bump go and golangci-lint versions, fix lint 2025-03-24 13:43:12 -07:00
Tim Hockin 69eb59185a Env var handling should prefer old names
For back-compat, if we find both an old and new env var for the same
flag, prefer the old.  This matters because the docker image sets
GITSYNC_ROOT but some users still set GIT_SYNC_ROOT.
2024-12-12 15:35:26 -08:00
Tim Hockin 28394608e8 Add the idea of "env-flags"
Env-flags are "flags" that can only be set by env var (see caveat below).
All of the real flags have a corresponding env-flag (kind of, but not
really).  The real goal was to deprecate `--password` but keep the env
var as a documented interface.

This does that (though --password still works) and updates the usage and
manual.

This allows some future work to follow the pattern.  We do not register
every CLI flag as an env-flag because the help text would be
duplicative.  This probably wants a wrapper API that allows declaring of
abstract flags, with CLI, env, or both sources.

Caveat:

ACTUALLY, these still have a flag, but the flag is specially named and
hidden.  This makes testing a little easier where passing flags is
handled well but env vars is not.
2024-06-13 14:40:14 -07:00
Tim Hockin fbc717e620
Clean up flag-related messages 2024-06-09 10:54:19 -07:00
Tim Hockin 8fa652dafa Break up main.go
Add new files for abspath, credential, and env functions.
2023-10-13 13:27:52 -07:00