Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Phrases []string // A list of really chill phrases Replacements map[string]string // A mapping of non-chill strings to chill strings StateImagesLocation string // The url location of chill state images }
A Config contains the various configuration settings available for the chill server.
func GetConfig ¶
func GetConfig(parsedArgs ParsedArgs, currentUser CurrentUser, readFile ReadFile) (*Config, error)
GetConfig calculates the Config from a given config file. The config file can be specified using the command line argument "-config" or can simply exist in the users home directory under the name ".chill/config.yaml". Config files should be in the yaml file format.
type CurrentUser ¶
A CurrentUser is a function that can return the user running the current program.
type ParsedArgs ¶
type ParsedArgs struct {
ConfigFile string
}
A ParsedArgs represents arguments given to the program at run time which can be used in the calculation of a Config struct.
Click to show internal directories.
Click to hide internal directories.