bindings

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

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

Duration bind duration to flag.

func NewDuration

func NewDuration(innerDuration *time.Duration) *Duration

NewDuration return duration binding.

func (*Duration) Set

func (duration *Duration) Set(str string) error

Set parser and write internal duration.

func (*Duration) String

func (duration *Duration) String() string

String return duration string.

type StringSlice

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

StringSlice bind string slice to flag.

func NewStringSlice

func NewStringSlice(slice *[]string) *StringSlice

NewStringSlice return string slice binding.

func (*StringSlice) Set

func (stringSlice *StringSlice) Set(value string) error

Set split value by comma and assign to inner slice.

func (*StringSlice) String

func (stringSlice *StringSlice) String() string

String return joined by comma slice.

Jump to

Keyboard shortcuts

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