flags

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastStringToMapStringUint64

func CastStringToMapStringUint64(value string) map[string]uint64

CastStringToMapStringUint64 casts string with comma separated values to map[string]uint64. Nil is returned if value fails format validation (consistnt with viper behavior).

Types

type StringToUint64Value

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

StringToUint64Value is a flag type for string to uint64 values.

func NewStringToUint64Value

func NewStringToUint64Value(p map[string]uint64) *StringToUint64Value

NewStringToUint64Value creates instance.

func (*StringToUint64Value) Set

func (s *StringToUint64Value) Set(val string) error

Set expects value as "smth=101,else=102".

func (*StringToUint64Value) String

func (s *StringToUint64Value) String() string

String marshals value of the StringToUint64Value instance.

func (*StringToUint64Value) Type

func (s *StringToUint64Value) Type() string

Type returns stringToUint64 type.

Jump to

Keyboard shortcuts

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