cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLoggingConsoleType  = "color"
	DefaultLoggingConsoleLevel = "info"
)
View Source
const (
	DefaultLoggingFileLevel = "info"
)

Variables

View Source
var (
	Version        = ""
	BuildTimestamp = ""
	Revision       = ""
)

These variables should be set during build time using "-X" ldflags.

Functions

func Run

func Run(config interface{}, defaults kong.Vars, run func(*kong.Context) errors.E)

Types

type ConfigFlag added in v0.2.0

type ConfigFlag string

func (ConfigFlag) BeforeResolve added in v0.2.0

func (c ConfigFlag) BeforeResolve(app *kong.Kong, ctx *kong.Context, trace *kong.Path) error

type LoggingConfig

type LoggingConfig struct {
	Log     zerolog.Logger `kong:"-" yaml:"-"`
	Logging struct {
		Console console `embed:"" prefix:"console." yaml:"console"`
		File    file    `embed:"" prefix:"file." yaml:"file"`
	} `embed:"" prefix:"logging." yaml:"logging"`
}

Jump to

Keyboard shortcuts

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