config

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(fileDir, fileName, fileType string, data interface{}, defaults ...Default) (err error)

Load config and bind it to a struct. THe struct is also validated.

func Save

func Save(fileDir, fileName, fileType string, data interface{}) error

Save config to a file. Config is validated before it is saved.

Types

type Default

type Default struct {
	Key   string
	Value interface{}
}

Default config value

Jump to

Keyboard shortcuts

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