cmd

package
v0.0.0-...-a315113 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HelpArgs = []string{"help", "--help", "-h"}

HelpArgs are the strings that indicate a cosmovisor help command.

View Source
var RunArgs = []string{"run"}

RunArgs are the strings that indicate a cosmovisor run command.

View Source
var Version = "1.1.0"

Version represents Cosmovisor version value. Overwritten during build

View Source
var VersionArgs = []string{"version", "--version"}

VersionArgs is the strings that indicate a cosmovisor version command.

Functions

func DoHelp

func DoHelp()

DoHelp outputs help text

func GetHelpText

func GetHelpText() string

GetHelpText creates the help text multi-line string.

func IsRunCommand

func IsRunCommand(arg string) bool

IsRunCommand checks if the given args indicate that a run is desired.

func IsVersionCommand

func IsVersionCommand(arg string) bool

IsVersionCommand checks if the given args indicate that the version is being requested.

func PrintVersion

func PrintVersion() error

PrintVersion prints the cosmovisor version.

func Run

func Run(args []string) error

Run runs the configured program with the given args and monitors it for upgrades.

func RunCosmovisorCommand

func RunCosmovisorCommand(args []string) error

RunCosmovisorCommand executes the desired cosmovisor command.

func ShouldGiveHelp

func ShouldGiveHelp(arg string) bool

ShouldGiveHelp checks the env and provided args to see if help is needed or being requested. Help is needed if either cosmovisor.EnvName and/or cosmovisor.EnvHome env vars aren't set. Help is requested if the first arg is "help", "--help", or "-h".

Types

This section is empty.

Jump to

Keyboard shortcuts

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