config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrParserError = errors.New("parser error")

Functions

func FlagToOption added in v0.4.0

func FlagToOption(flag string) string

func ParseKVPairs added in v0.4.0

func ParseKVPairs(pairs []string) map[string]string

Types

type Config

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

func Merge

func Merge(confs ...*Config) *Config

func NewWithOptions added in v0.4.0

func NewWithOptions(opts map[string]string) *Config

func ParseFile

func ParseFile(file string) (*Config, error)

func ParseFlags

func ParseFlags(flags []string, fn func(string) (any, bool)) (*Config, error)

func (*Config) Bool added in v0.4.0

func (c *Config) Bool(name string) (bool, bool)

func (*Config) MarshalJSON added in v0.4.0

func (c *Config) MarshalJSON() ([]byte, error)

func (*Config) String

func (c *Config) String(name string) (string, bool)

func (*Config) StringSlice added in v0.4.0

func (c *Config) StringSlice(name string) ([]string, bool)

Jump to

Keyboard shortcuts

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