config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: MIT Imports: 5 Imported by: 8

Documentation

Index

Constants

View Source
const NilDate = "Mon Jan  1 00:00:00 UTC 0001"

NilDate stores the string a empty Time type gets printed in Unix mode

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(path string) error

GetConfig loads default values and overwrites them by the ones in a file, or creates a file with them if there is no file

func LoadConfig

func LoadConfig(path string) error

LoadConfig reads the configuration file in the specified path

func WriteConfig

func WriteConfig(path string) error

WriteConfig writes the current configuration to the specified file

Types

type Config

type Config struct {
	DatabaseConnection string
	UseSocket          bool
	BindAddress        string
	BindSocket         string
	ContentDirectory   string
	TemplatesDirectory string
	AssetsDirectory    string
	SymbolicatorPath   string
}

Config holds the structure of the configuration

var C Config

C is the actual configuration read from the file

Jump to

Keyboard shortcuts

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