Commit Graph

4 Commits

Author SHA1 Message Date
Jarek Kowalski
525720db95 cli: added 'snapshot pin' command (#1528) 2021-11-20 20:53:25 -08:00
Jarek Kowalski
d2288c443f cli: major refactoring (#1046)
cli: major refactoring of how CLI commands are registered

The goal is to eliminate flags as global variables to allow for better
testing. Each command and subcommand and most sets of flags are now
their own struct with 'setup()' methods that attached the flags or
subcommand to the provided parent.

This change is 94.3% mechanical, but is fully organic and hand-made.

* introduced cli.appServices interface which provides the environment in which commands run
* remove auto-maintenance global flag
* removed globals in memory_tracking.go
* removed globals from cli_progress.go
* removed globals from the update_check.go
* moved configPath into TheApp
* removed remaining globals from config.go
* refactored logfile to get rid of global variables
* removed 'app' global variable
* linter fixes
* fixed password_*.go build
* fixed BSD build
2021-05-03 10:28:00 -07:00
Jarek Kowalski
f606ab4347 reorganized more top-level CLI commands into subcommands 2017-08-20 07:51:24 -07:00
Jarek Kowalski
81f060a2c3 CLI: renamed 'backup' to 'snapshot create' and 'backups' to 'snapshot list' 2017-08-19 23:44:51 -07:00