config

package
v0.0.0-...-f96ffc0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2015 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config converts a config struct to and from string format and persists to file.

Index

Constants

This section is empty.

Variables

View Source
var ConfigDir = os.Getenv("HOME") + "/.deepthought"

Functions

func Get

func Get(cfg interface{}, key string) string

Get config value as a string

func Keys

func Keys(cfg interface{}) []string

Return an array of strings with the struct keys

func Load

func Load(cfg interface{}, name string) error

Load struct from disk

func Print

func Print(cfg interface{})

Print the config to stdout

func Save

func Save(cfg interface{}, name string) error

Save config struct to disk

func Set

func Set(cfg interface{}, key, value string) error

Set config value from a string

func Update

func Update(cfg, in interface{})

Update values in config struct cfg to in

Types

This section is empty.

Jump to

Keyboard shortcuts

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