commands_util

package
v0.0.0-...-9b87225 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFlagError = errors.New("args don't start with a flag")
)

Functions

func AngrySnakes

func AngrySnakes(param string) string

func ConvertValue_bool

func ConvertValue_bool(s string) (bool, error)

func ConvertValue_float64

func ConvertValue_float64(s string) (float64, error)

func ConvertValue_int32

func ConvertValue_int32(s string) (int32, error)

func ConvertValue_int64

func ConvertValue_int64(s string) (int64, error)

func ConvertValue_string

func ConvertValue_string(s string) (string, error)

func ConvertValue_strings

func ConvertValue_strings(s string) ([]string, error)

func ConvertValue_uint32

func ConvertValue_uint32(s string) (uint32, error)

func ConvertValue_uint64

func ConvertValue_uint64(s string) (uint64, error)

func ErrForWrongParams

func ErrForWrongParams(expectedParams, paramValues, args []string) error

func ExtractFlagValues

func ExtractFlagValues(args []string) (remainingArgs []string, values map[string]string, err error)

Get all flag-value pairs from this args list, and return a new slice with the args that are left over.

func OverwriteRequestWithValues

func OverwriteRequestWithValues(requestObject interface{}, keyValues map[string]string) error

func PopulateRequestFromFilename

func PopulateRequestFromFilename(requestObject interface{}, filename string) error

func PrintRequestExample

func PrintRequestExample(req interface{})

func PrintResponse

func PrintResponse(response interface{}) error

func SplitParamValues

func SplitParamValues(arg string) (params []string)

Get each of the tokens from a joined arg. Tokens are considered to be joined by whatever the first character is. If the first character is in [a-zA-Z0-9], a slash is assumed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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