config

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() (string, error)

Types

type Config

type Config interface {
	GetString(key string) string
	GetBool(key string) bool
	GetInt(key string) int
	GetInt64(key string) int64
	Set(key string, val interface{}) error

	WriteConfig() error
}

func New

func New() Config

New returns a new Live config

func NewState

func NewState() (Config, error)

TODO make NewConfig like this?

type Live

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

Live provides a viper-backed config for commands

func (*Live) GetBool

func (c *Live) GetBool(key string) bool

func (*Live) GetInt

func (c *Live) GetInt(key string) int

func (*Live) GetInt64

func (c *Live) GetInt64(key string) int64

func (*Live) GetString

func (c *Live) GetString(key string) string

func (*Live) Set

func (c *Live) Set(key string, val interface{}) error

func (*Live) WriteConfig

func (c *Live) WriteConfig() error

Jump to

Keyboard shortcuts

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