config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Address of server in the format ip:port.
	Address string `json:"address"`
	// Logs holds log paths, if outputting to files.
	Logs Logs `json:"logs"`
}

Config for the main server.

func Default

func Default() *Config

Default returns a reasonable collection of defaults.

func Load

func Load(path string) (*Config, error)

LoadConfig attempts to load the JSON file at the provided path.

func (*Config) Save

func (cfg *Config) Save(path string) error

Save to file.

type Logs

type Logs struct {
	Messages string `json:"messages"`
	Errors   string `json:"errors"`
}

Logs define files to save output to.

Jump to

Keyboard shortcuts

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