Skip to content

fix: remove deprecated --site, --file, --days flags#55

Merged
ravinald merged 1 commit into
mainfrom
fix/remove-deprecated-flags
May 15, 2026
Merged

fix: remove deprecated --site, --file, --days flags#55
ravinald merged 1 commit into
mainfrom
fix/remove-deprecated-flags

Conversation

@ravinald
Copy link
Copy Markdown
Owner

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.

Old form (gone) New form
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 their os import as a side effect (only consumer was the Fprintln(os.Stderr, ...) deprecation warning).

Files

  • cmd/site.go — drops --file / -s / --site, removes deprecation block and package vars
  • cmd/apply_backup.go — drops --days, simplifies positional-only days parsing
  • docs/user-guide.md — example switched to positional
  • docs/configuration.md — flag-style example replaced with a note about Junos-style positional convention

Compatibility 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 ./... clean
  • go test ./... all green
  • wifimgr set ap site --help no longer shows --file / --site
  • wifimgr apply cleanup-backups --help no longer shows --days
  • Manual: wifimgr set ap site <site> file <path> works; wifimgr apply cleanup-backups 30 works

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
@ravinald ravinald merged commit 3718f73 into main May 15, 2026
7 checks passed
@ravinald ravinald deleted the fix/remove-deprecated-flags branch May 15, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant