config

package
v0.0.0-...-3e9ce2b Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2017 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config loads the configuration for polldot. If a configuration file is not found, a new one is created from default values.

Index

Constants

This section is empty.

Variables

View Source
var ErrHomeless = errors.New("HOME must be set")

Functions

This section is empty.

Types

type Config

type Config struct {
	URL string `json:"url"` // the file to retreive and check for '.'
	// contains filtered or unexported fields
}

Config contains all the fields from the configuration file.

func Load

func Load() (*Config, error)

Load loads the configuration from disk. If the configuration file is not found, a default configuration is used and written to disk.

type ErrVanilla

type ErrVanilla struct {
	// contains filtered or unexported fields
}

ErrVanilla is returned when no configurationfile is found and a new file is written. The content of the file corresponds to the value of the cfg variable just after defaults().

func (ErrVanilla) Error

func (e ErrVanilla) Error() string

Jump to

Keyboard shortcuts

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