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.
Example (Save) ¶
Output:
Index ¶
Examples ¶
Constants ¶
View Source
const ( DefaultScopes = "api read_user read_repository" DefaultCallbackHost = "localhost:2333" )
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶ added in v1.9.1
func Default ¶
Default get default config which is embedded in the source file, so that this program could run without any configuration file.
Types ¶
type Parser ¶ added in v1.8.0
type Parser interface { // Unmarshal ... Unmarshal(r io.Reader, rcv *types.Config) error // Marshal ... Marshal(cfg *types.Config) ([]byte, error) }
Parser is an interface to parse config in different ways. For example: JSON, TOML and YAML;
func NewTOMLParser ¶
func NewTOMLParser() Parser
Click to show internal directories.
Click to hide internal directories.