cmd

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package cmd provides CLI functionality.

Index

Constants

View Source
const DefaultLogLevel = "info"
View Source
const (
	EnvironmentVariablePrefix = "OTF_"
)

Variables

This section is empty.

Functions

func CatchCtrlC

func CatchCtrlC(cancel context.CancelFunc)

func NewLogger added in v0.0.12

func NewLogger(cfg *LoggerConfig) (logr.Logger, error)

func PrintError added in v0.0.12

func PrintError(err error)

func SetFlagsFromEnvVariables

func SetFlagsFromEnvVariables(fs *pflag.FlagSet)

SetFlagsFromEnvVariables overrides flag values with environment variables.

Types

type LoggerConfig added in v0.0.12

type LoggerConfig struct {
	// contains filtered or unexported fields
}

func NewLoggerConfigFromFlags added in v0.0.12

func NewLoggerConfigFromFlags(flags *pflag.FlagSet) *LoggerConfig

NewLoggerConfigFromFlags adds flags to the given flagset, and, after the flagset is parsed by the caller, the flags populate the returned logger config.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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