list

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: Unlicense Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeFilesystemPath added in v0.1.26

func NormalizeFilesystemPath(abs bool) func(*Opt) error

NormalizeFilesystemPath cleans a directory specification, expands the ~ home folder shortcut, and if abs is set to true, returns the absolute path from filesystem root

func NormalizeNetworkAddress added in v0.1.26

func NormalizeNetworkAddress(defaultPort string,
	userOnly bool) func(*Opt) error

NormalizeNetworkAddress checks correctness of a network address specification, and adds a default path if needed, and enforces whether the port requires root permission and clamps it if not.

Types

type Hook

type Hook func(*Opt) error

type Opt

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

func New

func New(m meta.Data, h ...Hook) (o *Opt)

func (*Opt) FromString added in v0.1.18

func (o *Opt) FromString(s string) (e error)

func (*Opt) Meta added in v0.1.19

func (o *Opt) Meta() meta.Metadata

func (*Opt) RunHooks added in v0.1.19

func (o *Opt) RunHooks() (e error)

func (*Opt) String

func (o *Opt) String() (s string)

func (*Opt) ToOption added in v0.1.19

func (o *Opt) ToOption() opts.Option

func (*Opt) Type

func (o *Opt) Type() meta.Type

func (*Opt) Value

func (o *Opt) Value() (c opts.Concrete)

Jump to

Keyboard shortcuts

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