Documentation ¶
Index ¶
Constants ¶
View Source
const AppName string = "donut"
Variables ¶
View Source
var UserHomeDir string
Functions ¶
func DefaultConfigFile ¶
func DefaultConfigFile() string
func DefaultStateDir ¶
func DefaultStateDir() string
func ExpandEnvFunc ¶
func ExpandEnvFunc() mapstructure.DecodeHookFunc
mapstructure's DecodeHookFunc that reads environment variables
func SetUserHomeDir ¶
func SetUserHomeDir(dir string) func()
Types ¶
type Config ¶
type Config struct { Source string `mapstructure:"source"` Destination string `mapstructure:"destination"` Excludes []string `mapstructure:"excludes"` Editor []string `mapstructure:"editor"` Pager []string `mapstructure:"pager"` Diff []string `mapstructure:"diff"` Merge []string `mapstructure:"merge"` Concurrency int File string }
func New ¶
func New(opts ...ConfigOption) (*Config, error)
type ConfigOption ¶
func WithData ¶
func WithData(data map[string]interface{}) ConfigOption
func WithDefault ¶
func WithDefault() ConfigOption
func WithFile ¶
func WithFile(path string) ConfigOption
func WithNameAndPath ¶
func WithNameAndPath(name string, paths ...string) ConfigOption
func WithPath ¶
func WithPath(path string) []ConfigOption
Click to show internal directories.
Click to hide internal directories.