Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
SubdirectoryName = "exercism"
)
Functions ¶
func Dir ¶
func Dir() string
Dir is the configured config home directory. All the cli-related config files live in this directory.
func InferSiteURL ¶
InferSiteURL guesses what the website URL is. The basis for the guess is which API we're submitting to.
Types ¶
type APIConfig ¶
APIConfig provides API-specific configuration values.
func NewAPIConfig ¶
NewAPIConfig loads the config file in the config directory.
func NewEmptyAPIConfig ¶
func NewEmptyAPIConfig() *APIConfig
NewEmptyAPIConfig doesn't load the config from file or set default values.
func (*APIConfig) SetDefaults ¶
func (cfg *APIConfig) SetDefaults()
SetDefaults ensures that we have all the necessary settings for the API.
type CLIConfig ¶
CLIConfig contains settings specific to the behavior of the CLI.
func NewCLIConfig ¶
NewCLIConfig loads the config file in the config directory.
func NewEmptyCLIConfig ¶
func NewEmptyCLIConfig() *CLIConfig
NewEmptyCLIConfig doesn't load the config from file or set default values.
func (*CLIConfig) SetDefaults ¶
func (cfg *CLIConfig) SetDefaults()
SetDefaults ensures that we have all the necessary settings for the CLI.
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is a wrapper around a viper configuration.
type Track ¶
Track holds the CLI-related settings for a track.
func (*Track) AcceptFilename ¶
AcceptFilename judges a files admissability based on the name.
func (*Track) CompileRegexes ¶
CompileRegexes precompiles the ignore patterns.
func (*Track) SetDefaults ¶
func (t *Track) SetDefaults()
SetDefaults configures a track with default values.
type UserConfig ¶
UserConfig contains user-specific settings.
func NewEmptyUserConfig ¶
func NewEmptyUserConfig() *UserConfig
NewEmptyUserConfig creates a user configuration without loading it.
func NewUserConfig ¶
func NewUserConfig() (*UserConfig, error)
NewUserConfig loads a user configuration if it exists.
func (*UserConfig) Load ¶
func (cfg *UserConfig) Load(v *viper.Viper) error
Load reads a viper configuration into the config.
func (*UserConfig) Normalize ¶
func (cfg *UserConfig) Normalize()
Normalize ensures that we have proper values where possible.