Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Copyright is the copyright information for the program. Copyright = "Copyright (c) 2022 Josh Hogle. All rights reserved." // Title is the title of the program. Title = "json-exec" )
Variables ¶
View Source
var ( // Build is the first 8 characters of the git commit hash. Build string // CommandName is the name of the command to display in help and version info. CommandName string // IsDevBuild is the boolean equivalent of IsDevelopment since we cannot pass bools in via the -X option to LDFLAGS. IsDevBuild bool // IsDevelopment is used to flag whether or not this is a development build. IsDevelopment string // ReleaseDate is the date the binary was released in the form DD MMM YYYY. ReleaseDate string // Version is the current semver-compatible version of the product. Version string )
These variables, while global, are set at compile-time and do not change.
Functions ¶
This section is empty.
Types ¶
type Main ¶
type Main interface { // GetCommandLineFlags returns a map of all global and command-specified flags passed via the command line. // // If a flag was not passed, it should not be present in the map. This will allow the caller to quickly // determine whether or not a flag was specified on the command line rather than having to traverse an // entire array. // // The boolean value the flag is mapped to should always be true. GetCommandLineFlags(cmd *cobra.Command) map[string]bool // GetExitCode retrieves the exit code for the application. GetExitCode() int // SetExitCode sets the exit code for the application. SetExitCode(int) }
Main represents an interface for the main application.
Click to show internal directories.
Click to hide internal directories.