helper

package
v1.0.0-dev-2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigFileDefaultLocations = []string{
	"./",
	"/goff/",
	"/etc/opt/goff/",
}

Functions

func FlagTypeFromVariations

func FlagTypeFromVariations(variations map[string]*any) (model.FlagType, error)

func LoadConfigFile

func LoadConfigFile(
	inputFilePath string,
	configFormat string,
	defaultLocations []string,
) (map[string]dto.DTO, error)

func PrintFatalAndExit

func PrintFatalAndExit(err error)

Types

type Level

type Level = string
const (
	WarnLevel    Level = "WARNING"
	InfoLevel    Level = "INFO"
	ErrorLevel   Level = "ERROR"
	DefaultLevel Level = "DEFAULT"
)

type Output

type Output struct {
	Lines []OutputLine
}

func (*Output) Add

func (o *Output) Add(line string, level Level) Output

func (*Output) PrintLines

func (o *Output) PrintLines(cmd *cobra.Command)

type OutputLine

type OutputLine struct {
	Text  string
	Level Level
}

Jump to

Keyboard shortcuts

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