config

package
v0.0.0-...-e38b929 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2017 License: MIT Imports: 2 Imported by: 5

README

Config

This is easily the least interesting part of the entire project. It just loads the config file found in the root directory.

I'm a huge fan of the library used to do this (https://github.com/spf13/viper) and I essentially use it in every Go project. However, at this current iteration (0.1.x), I am not making full use of it. I would like to add support for environmental variables in the future, and will do so.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	HeartbeatInterval int
	HeartbeatLoop     int
	BloomfilterSize   uint
	BaseNode          bool
	RemotePeers       []string
	ListenPort        int
	IsTesting         bool
}

Config houses information loaded from the config file.

func ReadConfig

func ReadConfig() *Cfg

ReadConfig handles opening a file and creating a config object for use throughout the application.

Jump to

Keyboard shortcuts

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