cliutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Action

func Action(actionFunc cli.ActionFunc) cli.ActionFunc

func ConfigureLoggingFlags

func ConfigureLoggingFlags(shouldHide bool) []cli.Flag

func ConfiguredAction

func ConfiguredAction(actionFunc cli.ActionFunc) cli.ActionFunc

func ConfiguredActionWithWarnings

func ConfiguredActionWithWarnings(actionFunc func(*cli.Context, string) error) cli.ActionFunc

Just like ConfiguredAction, but accepts a second parameter with configuration warnings.

func RemovedCommand

func RemovedCommand(name string) *cli.Command

func UsageError

func UsageError(format string, args ...interface{}) error

func WithErrorHandler

func WithErrorHandler(actionFunc cli.ActionFunc) cli.ActionFunc

Ensures exit with error code if actionFunc returns an error

Types

type BuildInfo

type BuildInfo struct {
	GoOS            string `json:"go_os"`
	GoVersion       string `json:"go_version"`
	GoArch          string `json:"go_arch"`
	BuildType       string `json:"build_type"`
	NetscaleVersion string `json:"netscale_version"`
}

func GetBuildInfo

func GetBuildInfo(buildType, version string) *BuildInfo

func (*BuildInfo) GetBuildTypeMsg

func (bi *BuildInfo) GetBuildTypeMsg() string

func (*BuildInfo) Log

func (bi *BuildInfo) Log(log *zerolog.Logger)

func (*BuildInfo) OSArch

func (bi *BuildInfo) OSArch() string

func (*BuildInfo) UserAgent

func (bi *BuildInfo) UserAgent() string

func (*BuildInfo) Version

func (bi *BuildInfo) Version() string

Jump to

Keyboard shortcuts

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