conf

package module
v0.0.0-...-a4141df Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

README

conf

A simple configuration utility for Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsStrings

func AsStrings(slice []interface{}) []string

Types

type Data

type Data struct {
	// contains filtered or unexported fields
}

func FromBytes

func FromBytes(raw []byte) (*Data, error)

func FromFile

func FromFile(path string) (*Data, error)

func FromMap

func FromMap(value map[string]interface{}) *Data

func FromString

func FromString(s string) (*Data, error)

func (*Data) GetBool

func (data *Data) GetBool(key string, defaultValue bool) bool

func (*Data) GetInt

func (data *Data) GetInt(key string, defaultValue int) int

func (*Data) GetString

func (data *Data) GetString(key string, defaultValue string) string

func (*Data) GetStrings

func (data *Data) GetStrings(key string, defaultValue []string) []string

func (*Data) String

func (data *Data) String() string

Jump to

Keyboard shortcuts

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