config

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextExists

func ContextExists(contextName string) bool

func GetBool

func GetBool(key string) bool

func GetContextNames

func GetContextNames() []string

func GetCurrentContextName

func GetCurrentContextName() string

GetCurrentContextName returns the name of the current context

func GetInt

func GetInt(key string) int

func GetString

func GetString(key string) string

func GetStringMapString

func GetStringMapString(key string) map[string]string

func Init

func Init(configPath string) error

Init initialises the config package

func Reset

func Reset()

func Save

func Save() error

Save saves the config to configured config file (or default)

func Set

func Set(contextName string, key string, value any)

func SetCurrentContext

func SetCurrentContext(key string, value any) error

func SetDefault

func SetDefault(contextName string, key string, value any)

func SetFs

func SetFs(fs afero.Fs)

SetFs sets the filesystem instance to use

func SwitchCurrentContext

func SwitchCurrentContext(contextName string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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