cmd

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 21 Imported by: 0

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 Execute

func Execute()

This Execute() function is called from main to run the CLI.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL