conf

package
v0.0.0-...-a8bd3f9 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(fp string) error

Load loads the configuration file into C

Types

type Conf

type Conf struct {
	Host  string `yaml:"host"`
	Port  int    `yaml:"port"`
	Debug bool   `yaml:"debug"`
	DB    string `yaml:"db"`
	Token string `yaml:"token"`
}

Conf is a struct used to configure the program

var C *Conf

C is the main exported configuration struct

func NewDefaults

func NewDefaults() *Conf

NewDefaults creates a new Conf struct with default values already filled

func (Conf) ListenAddress

func (c Conf) ListenAddress() string

ListenAddress returns the listen address of the server

Jump to

Keyboard shortcuts

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