argutils

package
v1.0.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2016 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArgBoolOrFalse

func ArgBoolOrFalse(args map[string]interface{}, argName string) bool

ArgBoolOrFalse returns the requested argument as a boolean, or as false if the argument is not present.

func ArgStringOrBlank

func ArgStringOrBlank(args map[string]interface{}, argName string) string

ArgStringOrBlank returns the requested argument as a string, or as a blank string if the argument is not present.

func ValidateASNumber

func ValidateASNumber(str string) numorstring.ASNumber

ValidateASNumber takes a string as an input and makes sure it's a valid ASNumber. Returns the parsed ASNumber, and prints error and exits if not.

func ValidateIP

func ValidateIP(str string) cnet.IP

ValidateIP takes a string as an input and makes sure it's a valid IPv4 or IPv6 address. Returns the parsed IP, and prints error and exits if not valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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