Documentation
¶
Overview ¶
The cmd package implements the interface for the magellan CLI. The files contained in this package only contains implementations for handling CLI arguments and passing them to functions within magellan's internal API.
Each CLI subcommand will have at least one corresponding internal file with an API routine that implements the command's functionality. The main API routine will usually be the first function defined in the fill.
For example:
cmd/scan.go --> internal/scan.go ( magellan.ScanForAssets() ) cmd/collect.go --> internal/collect.go ( magellan.CollectAll() ) cmd/list.go --> none (doesn't have API call since it's simple) cmd/update.go --> internal/update.go ( magellan.UpdateFirmware() )
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeConfig ¶ added in v0.0.7
func InitializeConfig()
InitializeConfig() initializes a new config object by loading it from a file given a non-empty string.
See the 'LoadConfig' function in 'internal/config' for details.
func SetDefaults ¶ added in v0.0.7
func SetDefaults()
SetDefaults() resets all of the viper properties back to their default values.
TODO: This function should probably be moved to 'internal/config.go' instead of in this file.
Types ¶
This section is empty.