config

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Project     = "ux"
	DefaultName = ".config"
	DefaultType = "yaml"
	DefaultFile = DefaultName + "." + DefaultType
)

Variables

View Source
var (
	DefaultDir  = filepath.Join(xdg.ConfigHome, Project)
	DefaultPath = filepath.Join(DefaultDir, DefaultFile)
	PluginDir   = filepath.Join(DefaultDir, "plugins")
	LocalBin    = xdg.BinHome
)

Functions

func ConfigVar

func ConfigVar(flags *pflag.FlagSet, p *string)

ConfigVar defines a string flag named config accepting a configuration file path. The argument p points to a string variable in which to store the value of the flag.

Types

type Config

type Config interface{}

type GlobalOptions

type GlobalOptions struct {
	Config string
}

func (*GlobalOptions) ConfigVar

func (opts *GlobalOptions) ConfigVar(flags *pflag.FlagSet)

func (*GlobalOptions) NewConfig

func (opts *GlobalOptions) NewConfig() Config

Jump to

Keyboard shortcuts

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