config

package
v0.25.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoConfig          = "-no-config"
	DefaultConfigFile = "g.yaml"
)

Variables

View Source
var (
	InitConfigDir util.Once
	Dir           = ""
)
View Source
var Default = Config{
	Args: make([]string, 0),
}

Functions

func GetUserConfigDir

func GetUserConfigDir() (string, error)

Types

type Config

type Config struct {
	Args            []string  `yaml:"Args"`
	CustomTreeStyle TreeStyle `yaml:"CustomTreeStyle"`
	ThemeLocation   string    `yaml:"Theme"`
}

func Load

func Load() (*Config, error)

type ErrReadConfig

type ErrReadConfig struct {
	Location string
	// contains filtered or unexported fields
}

func (ErrReadConfig) Error

func (e ErrReadConfig) Error() string

type TreeStyle

type TreeStyle struct {
	Child     string `yaml:"Child"`
	LastChild string `yaml:"LastChild"`
	Mid       string `yaml:"Mid"`
	Empty     string `yaml:"Empty"`
}

func (TreeStyle) IsEmpty

func (t TreeStyle) IsEmpty() bool

func (TreeStyle) IsEnabled

func (t TreeStyle) IsEnabled() bool

Jump to

Keyboard shortcuts

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