fix: remove deprecated --site, --file, --days flags#55
Merged
Conversation
These three flags have been emitting DEPRECATED: warnings on stderr in
favor of positional forms:
set ap site --file <path> -s <site> → set ap site <site> file <path>
apply cleanup-backups --days <n> → apply cleanup-backups <n>
Hard-remove the flag definitions, the supporting package-level vars
(assignmentFile, targetSite), and the translation blocks that copy flag
values back into positional state. Both files lose their os import as
a side effect (only consumer was the deprecation warning).
Docs:
- docs/user-guide.md: example uses positional 30 instead of --days 30
- docs/configuration.md: replace flag-style example block with a note
pointing back to the Junos-style positional convention
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hard-remove three CLI flags that have been emitting
DEPRECATED:warnings in favor of their positional forms. Item #2 of the legacy cleanup roadmap.set ap site --file <path> -s <site>set ap site <site> file <path>apply cleanup-backups --days <n>apply cleanup-backups <n>Drops the flag definitions, the supporting package-level vars (
assignmentFile,targetSite), and the translation blocks that copied flag values back into positional state. Both files lose theirosimport as a side effect (only consumer was theFprintln(os.Stderr, ...)deprecation warning).Files
cmd/site.go— drops--file/-s/--site, removes deprecation block and package varscmd/apply_backup.go— drops--days, simplifies positional-only days parsingdocs/user-guide.md— example switched to positionaldocs/configuration.md— flag-style example replaced with a note about Junos-style positional conventionCompatibility note
This is a hard break. Anyone scripting against the old flags will need to migrate. The deprecation warnings have been live; user confirmed no internal scripts pin the old form.
Test plan
go build ./...cleango test ./...all greenwifimgr set ap site --helpno longer shows--file/--sitewifimgr apply cleanup-backups --helpno longer shows--dayswifimgr set ap site <site> file <path>works;wifimgr apply cleanup-backups 30works