tomlconfig

package
v0.0.0-...-7429660 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Integer   = "Integer"
	Float     = "Float"
	Datetime  = "Datetime"
	String    = "String"
	Bool      = "Bool"
	Array     = "Array"
	Hash      = "Hash"
	ArrayHash = "ArrayHash"
)

Functions

func ParseTomlConfig

func ParseTomlConfig(filepath string, v interface{}) error

func ParseTomlString

func ParseTomlString(data string, v interface{}) error

Types

type Config

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

func NewConfig

func NewConfig(filepath string, v interface{}) (*Config, error)

func NewTomlConfig

func NewTomlConfig(filepath string) (*Config, error)

func (*Config) Bool

func (c *Config) Bool(key string, defaultValue bool) bool

func (*Config) Float64

func (c *Config) Float64(key string, defaultValue float64) float64

func (*Config) Int64

func (c *Config) Int64(key string, defaultValue int64) (int64, bool)

func (*Config) String

func (c *Config) String(key string, defaultValue string) (string, bool)

Jump to

Keyboard shortcuts

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