params

package
v1.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlagErr

func FlagErr(flagName, format string, a ...any) error

func Map

func Map(flagName, paramsStr string, obj interface{}) error

Map assigns the parameter value into the right struct field, which is represented by obj. For example, if we use Map("param1", "value1", &myFlag) with MyFlag struct above, Param1 field would be assigned with "value1".

func SplitPrefixedName

func SplitPrefixedName(prefixedName string) (prefix string, name string, err error)

SplitPrefixedName splits prefixedName with "/" as a separator

func Supported

func Supported(obj interface{}) string

Supported returns the list of supported flags for a parameter struct. This is mainly used to show the user the list of supported parameters

Types

This section is empty.

Jump to

Keyboard shortcuts

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