properties

package
v0.0.0-...-80cfa99 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Properties

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

Properties A basic set of properties

func NewProperties

func NewProperties() *Properties

NewProperties Create an empty set of properties

func (*Properties) Expand

func (p *Properties) Expand(text string) (string, error)

Expand Expand any property placeholders in the given text using the properties from this set

func (*Properties) Load

func (p *Properties) Load(file string) error

Load Load properties from a file into the properties set

func (*Properties) Map

func (p *Properties) Map() map[string]string

Map Get properties set as a map (retrieves actual backing map)

func (*Properties) Merge

func (p *Properties) Merge(other *Properties) error

Merge Merge properties from another set into this one

func (*Properties) ResolveFrom

func (p *Properties) ResolveFrom(context *Properties) error

ResolveFrom Expands all properties of this set using properties from another

func (*Properties) Set

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

Set Set a property, expanding the value before setting

Jump to

Keyboard shortcuts

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