Documentation
¶
Index ¶
Constants ¶
View Source
const ( // OutputFormatHuman for human readable output OutputFormatHuman = "human" // OutputFormatJSON for JSON output OutputFormatJSON = "json" // OutputFormatCustom for custom output OutputFormatCustom = "custom" )
Variables ¶
View Source
var ( // OutputFields for custom format output OutputFields string // OutputFormat for custom format output OutputFormat string // RegionSet picks the region to connect to, if you use this option it will use it over the default region RegionSet string // DefaultYes : automatic yes to prompts; assume \"yes\" as answer to all prompts and run non-interactively DefaultYes bool // PrettySet : Prints the json output in pretty format PrettySet bool // VersionCli is set from outside using ldflags VersionCli = "0.0.0" // CommitCli is set from outside using ldflags CommitCli = "none" // DateCli is set from outside using ldflags DateCli = "unknown" )
View Source
var OutputFormats = []string{OutputFormatJSON, OutputFormatHuman, OutputFormatCustom}
OutputFormats lists the values accepted by the --output flag
Functions ¶
func CheckVersionUpdate ¶ added in v0.1.77
func CheckVersionUpdate()
CheckVersionUpdate checks if there's an update to be done
func GithubClient ¶ added in v0.1.77
GithubClient Create a Github client
func IssueMessage ¶ added in v0.1.77
func IssueMessage()
IssueMessage is the message to be displayed when an error is returned
func VersionCheck ¶ added in v0.1.77
func VersionCheck(client *github.Client) (res *github.RepositoryRelease, skip bool)
VersionCheck checks if there is a new version of the CLI
Types ¶
type OutputFormatFlag ¶ added in v1.6.1
type OutputFormatFlag struct {
// contains filtered or unexported fields
}
OutputFormatFlag is a flag value that only accepts one of OutputFormats, so an unsupported format fails while the flags are parsed
func NewOutputFormatFlag ¶ added in v1.6.1
func NewOutputFormatFlag(target *string, defaultFormat string) *OutputFormatFlag
NewOutputFormatFlag returns an OutputFormatFlag that stores the chosen format in target, starting at defaultFormat
func (*OutputFormatFlag) Set ¶ added in v1.6.1
func (f *OutputFormatFlag) Set(value string) error
Set stores value if it is a supported output format
func (*OutputFormatFlag) String ¶ added in v1.6.1
func (f *OutputFormatFlag) String() string
func (*OutputFormatFlag) Type ¶ added in v1.6.1
func (f *OutputFormatFlag) Type() string
Type is shown next to the flag name in the help output
Click to show internal directories.
Click to hide internal directories.