props

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: BSD-3-Clause Imports: 1 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 []string

This type represents a collection of key/value properties, and is used for both the env properties and the command line arguments.

func DefaultEnv

func DefaultEnv() *Properties

Returns a copy of the system environment as a props.Properties type

func Empty

func Empty() *Properties

Create an empty collection for the properties. More properties can be added later

func From

func From(properties map[string]string) *Properties

Create from a map of key/values

func (*Properties) Append

func (props *Properties) Append(key, value string) *Properties

Append a key/value property. Flags can be represented with an empty value

E.g.: props.Append("-flag", "")

func (*Properties) AppendAll

func (props *Properties) AppendAll(properties map[string]string) *Properties

Append multiple key/value properties. Flags can be represented with an empty value

E.g.: props.AppendAll(map[string]string{"-arg": "value", "-flag": ""})

func (*Properties) Copy

func (props *Properties) Copy() *Properties

Returns a copy of the properties that will not mutate the original collection

func (*Properties) Merge

func (props *Properties) Merge(extraProps *Properties) *Properties

props1.Merge(props2) will merge props2 properties into props1, but without modifying props2

Jump to

Keyboard shortcuts

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