Documentation ¶
Overview ¶
Package conf implements the configuration of the application. The configuration is loaded from the configuration file. The configuration file is a TOML file. TODO(@yeqown): store configuration in the database instead of the file, and then we can use CLI application to manage and checkout these configurations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCWD ¶ added in v1.6.2
func DefaultCWD() string
DefaultCWD returns the working directory of current project, default cwd is from git rev-parse --show-toplevel command, but if the command could not execute successfully, `pwd` command will be used instead.
func DefaultConfPath ¶
func DefaultConfPath() string
Types ¶
type ConfigParser ¶
type ConfigParser interface { // Unmarshal ... Unmarshal(r io.Reader, rcv *types.Config) error // Marshal ... Marshal(cfg *types.Config) ([]byte, error) }
ConfigParser is an interface to parse config in different ways. For example: JSON, TOML and YAML;
func NewTOMLParser ¶
func NewTOMLParser() ConfigParser
Click to show internal directories.
Click to hide internal directories.