Documentation
¶
Index ¶
- Variables
- func Get(key string) string
- func Int(def int, key string) int
- func LoadFile(filename string) error
- func On(def bool, keys ...string) bool
- func RegisterListener(fn func(*Properties))
- func Set(key string, value any)
- func String(def string, keys ...string) string
- func Update(props map[string]string)
- type Properties
- func (p *Properties) Get(key string) string
- func (p *Properties) GetAll() map[string]string
- func (p *Properties) Int(def int, key string) int
- func (p *Properties) LoadFile(filename string) error
- func (p *Properties) On(def bool, keys ...string) bool
- func (p *Properties) RegisterListener(fn func(*Properties))
- func (p *Properties) Set(key string, value any)
- func (p *Properties) String(def string, keys ...string) string
- func (p *Properties) Update(props map[string]string)
Constants ¶
This section is empty.
Variables ¶
View Source
var Global = &Properties{ m: make(map[string]string), }
Functions ¶
func RegisterListener ¶
func RegisterListener(fn func(*Properties))
Types ¶
type Properties ¶
type Properties struct {
// contains filtered or unexported fields
}
func (*Properties) Get ¶
func (p *Properties) Get(key string) string
func (*Properties) GetAll ¶
func (p *Properties) GetAll() map[string]string
func (*Properties) LoadFile ¶
func (p *Properties) LoadFile(filename string) error
func (*Properties) RegisterListener ¶
func (p *Properties) RegisterListener(fn func(*Properties))
func (*Properties) Set ¶
func (p *Properties) Set(key string, value any)
func (*Properties) Update ¶
func (p *Properties) Update(props map[string]string)
Click to show internal directories.
Click to hide internal directories.