package config import "time" type Config struct { GitlabHost string `yaml:"gitlabHost" json:"gitlabHost"` GitlabToken string `yaml:"gitlabToken" json:"gitlabToken"` LogLevel string `yaml:"logLevel" json:"logLevel" enum:"info,warn,debug,error"` ProjectPath string `yaml:"projectPath" json:"projectPath"` Cache cacheConfig `yaml:"cache" json:"cache"` Dump struct { Full bool } } type loadConfig struct { OwnerOnly bool `yaml:"ownerOnly" json:"ownerOnly"` } type cacheConfig struct { Ttl time.Duration `yaml:"ttl,omitempty" json:"ttl,omitempty"` File string `yaml:"file,omitempty" json:"file,omitempty"` Load loadConfig `yaml:"load" json:"load"` Clear struct { ClearAliases bool `yaml:"clearAliases,omitempty" json:"clearAliases,omitempty"` } `yaml:"clear,omitempty" json:"clear,omitempty"` } var DefaultConfig = Config{ GitlabHost: "https://gitlab.com", GitlabToken: "yourtokenhere", LogLevel: "warn", ProjectPath: "~/work/projects", Cache: cacheConfig{ Ttl: 168 * time.Hour, Load: loadConfig{ OwnerOnly: true, }, }, }