config

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2020 License: MIT Imports: 4 Imported by: 5

README

Config

Utility for loading JSON configuration for command-line tools, nothing interesting, but copy/pasting is lame.


GoDoc

Documentation

Overview

Package config provides super simple JSON configuration for command-line programs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(path string, v interface{}) error

Load configuration from path, into the struct pointer provided. No error is returned if the file does not exist.

func LoadHome added in v1.1.0

func LoadHome(path string, v interface{}) error

LoadHome loads configuration from path relative to the user home directory.

func Save

func Save(path string, v interface{}) error

Save saves configuration to path. If the directory does not exist, it is created.

func SaveHome added in v1.1.0

func SaveHome(path string, v interface{}) error

SaveHome saves configuration to path relative to the user home directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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