config

package
v0.0.0-...-e249936 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(configFile string) error

InitConfig inits configuration

func LoadConfig

func LoadConfig(configFile string, config *Config) error

LoadConfig loads configuration from file

Types

type Config

type Config struct {
	Server server.Config `yaml:"server"`
	Debug  debug.Config  `yaml:"debug"`
	Log    log.Config    `yaml:"log"`
}

Config defines configuration

var C Config

C is default static config

func (*Config) Check

func (c *Config) Check() error

Check checks if config is valid

func (*Config) ToString

func (c *Config) ToString() (string, error)

ToString converts server config to string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL