config

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: MIT Imports: 16 Imported by: 478

README

config

Documentation

Index

Constants

View Source
const ConfArgument = "conf"
View Source
const ConfEnvironment = "CONF"

Variables

This section is empty.

Functions

func Add

func Add(key string, value interface{}, description string, opts ...Option)

func Bool

func Bool(path string) bool

func BoolMap

func BoolMap(path string) map[string]bool

func Bools

func Bools(path string) []bool

func Bytes

func Bytes(path string) []byte

func Duration

func Duration(path string) time.Duration

func Exists

func Exists(path string) bool

func Float64

func Float64(path string) float64

func Float64Map

func Float64Map(path string) map[string]float64

func Float64s

func Float64s(path string) []float64

func Int

func Int(path string) int

func Int64

func Int64(path string) int64

func Int64Map

func Int64Map(path string) map[string]int64

func Int64s

func Int64s(path string) []int64

func IntMap

func IntMap(path string) map[string]int

func Ints

func Ints(path string) []int

func Load

func Load()

func String

func String(path string) string

func StringMap

func StringMap(path string) map[string]string

func Strings

func Strings(path string) []string

func Time

func Time(path, layout string) time.Time

func Unmarshal

func Unmarshal(o interface{}) error

func UnmarshalWithPath

func UnmarshalWithPath(path string, o interface{}) error

Types

type Config

type Config struct {
	Key         string
	Value       interface{}
	Description string
	Options     *Options
}

func Entries

func Entries() []Config

type Option

type Option func(options *Options)

func WithHide

func WithHide() Option

type Options

type Options struct {
	Hide bool
}

Directories

Path Synopsis
examples
env_file command

Jump to

Keyboard shortcuts

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