config

package module
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 11 Imported by: 4

README

config

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get added in v0.3.0

func Get(key string) string

Get retrieve string value by key or return empty string if not found

func GetInt added in v0.3.0

func GetInt(key string) int

func GetIntOr added in v0.3.0

func GetIntOr(key string, def int) int

func GetOr added in v0.3.0

func GetOr(key, def string) string

GetOr retrieve string value by key or return def value if not found

func Open added in v0.3.0

func Open(filename string) error

func Put added in v0.3.0

func Put(key string, value string)

func Save added in v0.3.0

func Save() error

func String added in v0.3.0

func String() string

Types

type File added in v0.3.0

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

func New added in v0.3.0

func New() *File

func NewFile added in v0.3.0

func NewFile(filename string) *File

func ParseFile

func ParseFile(filename string) (*File, error)

func (*File) Get added in v0.3.0

func (f *File) Get(key string) string

Get retrieve string value by key or return empty string if not found

func (*File) GetArray added in v0.3.0

func (f *File) GetArray(key string) []*Node

func (*File) GetInt added in v0.3.0

func (f *File) GetInt(key string) int

func (*File) GetIntOr added in v0.3.0

func (f *File) GetIntOr(key string, def int) int

func (*File) GetOr added in v0.3.0

func (f *File) GetOr(key, def string) string

GetOr retrieve string value by key or return def value if not found

func (*File) Put added in v0.3.0

func (f *File) Put(key string, value string) *File

func (*File) Save added in v0.3.0

func (f *File) Save() error

func (*File) String added in v0.3.0

func (f *File) String() string

type Node added in v0.2.0

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

func GetArray added in v0.3.0

func GetArray(key string) []*Node

func (*Node) Get added in v0.2.0

func (n *Node) Get(key string) string

func (*Node) GetInt added in v0.2.0

func (n *Node) GetInt(key string) int

func (*Node) String added in v0.2.0

func (n *Node) String() string

Jump to

Keyboard shortcuts

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