config

package
v0.0.0-...-e90a610 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 6 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 *C) error

LoadConfig loads configuration from file

Types

type C

type C struct {
	Log log.Config `json:"log" yaml:"log"`
}

C defines configuration

var Config C

DefaultConfig is default configuration

func (*C) Check

func (c *C) Check() error

Check checks if config is valid

func (*C) ToString

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

ToString converts server config to string

Jump to

Keyboard shortcuts

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