properties

package
v1.26.2 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Global = &Properties{
	m: make(map[string]string),
}

Functions

func Get

func Get(key string) string

func Int

func Int(def int, key string) int

func LoadFile

func LoadFile(filename string) error

func On

func On(def bool, keys ...string) bool

func RegisterListener

func RegisterListener(fn func(*Properties))

func Set

func Set(key string, value any)

func String

func String(def string, keys ...string) string

func Update

func Update(props map[string]string)

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) Int

func (p *Properties) Int(def int, key string) int

func (*Properties) LoadFile

func (p *Properties) LoadFile(filename string) error

func (*Properties) On

func (p *Properties) On(def bool, keys ...string) bool

func (*Properties) RegisterListener

func (p *Properties) RegisterListener(fn func(*Properties))

func (*Properties) Set

func (p *Properties) Set(key string, value any)

func (*Properties) String

func (p *Properties) String(def string, keys ...string) string

func (*Properties) Update

func (p *Properties) Update(props map[string]string)

Jump to

Keyboard shortcuts

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