config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Align = 0 // Cleartext alignment, if not set it is autodetected

Functions

func Help

func Help(w io.Writer, c CfgMap)

func Parse

func Parse(c CfgMap) error

func PrintableConfig

func PrintableConfig(c CfgMap) []string

Types

type CfgMap

type CfgMap map[string]Config

type Config

type Config struct {
	Value        any       // Value
	DefaultValue any       // Default value if Value is not set
	Help         string    // One line help
	Print        PrintMode // Print mode
	Required     bool      // If true, error out with error
}

type PrintMode

type PrintMode int
const (
	PrintSecret PrintMode = iota
	PrintAll
	PrintNothing
)

Jump to

Keyboard shortcuts

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