config

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: BSD-3-Clause-Clear Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputJSON   = "json"
	OutputStyled = "styled"

	ErrLoadingConfig Error = "error loading config"
)

Variables

This section is empty.

Functions

func UpdateOutputFormat

func UpdateOutputFormat(cfgKey, format string)

Types

type Config

type Config struct {
	Output Output `yaml:"output"`
}

func LoadConfig

func LoadConfig(file string, key string) (*Config, error)

Load config with viper. TODO force creation of the config in the `~/.config/otdfctl` directory TODO the config file in gh is config.yaml -- might want to emulate this

type ConfigFlagOverrides

type ConfigFlagOverrides struct {
	OutputFormatJSON bool
}

captures all CLI flags that will override pre-specified config values

type Error

type Error string

func (Error) Error

func (e Error) Error() string

type Output

type Output struct {
	Format string `yaml:"format" default:"styled"`
}

Jump to

Keyboard shortcuts

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