argutils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2017 License: Apache-2.0 Imports: 5 Imported by: 19

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