Documentation
¶
Overview ¶
package config implements methods that handle reading and writing from a config.toml file in the root of a project. This will be the root command. It passes the config file attrs into context.
Index ¶
Constants ¶
View Source
const ConfKey string = "CONFIG"
View Source
const LoggerKey string = "LOGGER"
Variables ¶
View Source
var DefaultConfigFile []byte
Functions ¶
func BuildFlags ¶
Types ¶
type Config ¶
type Config struct {
Metadata Meta `toml:"meta"`
Theme Theme `toml:"theme"`
Options DevOptions `toml:"dev"`
}
func NewDefaultConfig ¶
func NewDefaultConfig() Config
func OpenConfig ¶
func (Config) UpdateLogLevel ¶
type DevOptions ¶
type DevOptions struct {
Port int32 `toml:"port"`
StaticDir string `toml:"static_dir"`
TemplateDir string `toml:"template_dir"`
ContentDir string `toml:"content_dir"`
BuildDir string `toml:"build_dir"`
Level string `toml:"level"`
}
func (DevOptions) GetStaticPath ¶
func (d DevOptions) GetStaticPath() string
Click to show internal directories.
Click to hide internal directories.