Documentation ¶
Overview ¶
Package util provides some common utilities for testing.
Index ¶
- func GetEnvBoolOr(env string, defaultValue bool) bool
- func GetEnvIntOr(env string, defaultValue int) int
- func GetEnvOr(env string, defaultValue string) string
- func MustAtoi(s string) int
- func MustConvert32B(p []byte) [32]byte
- func MustConvert64B(p []byte) [64]byte
- func MustConvert80B(p []byte) [80]byte
- func MustDecodeHexString(s string) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvBoolOr ¶
GetEnvBoolOr returns an environment variable in bool specified by env, or returns defaultValue if the environment variable is not defined or cannot be parsed.
func GetEnvIntOr ¶
GetEnvIntOr returns an environment variable in int specified by env, or returns defaultValue if the environment variable is not defined or cannot be parsed.
func GetEnvOr ¶
GetEnvOr returns an environment variable specified by env, or returns defaultValue if the environment variable is not defined.
func MustConvert32B ¶
MustConvert32B returns a byte array or raises panic.
func MustConvert64B ¶
MustConvert64B returns a byte array or raises panic.
func MustConvert80B ¶
MustConvert80B returns a byte array or raises panic.
func MustDecodeHexString ¶
MustDecodeHexString returns a decoded string or raises panic.
Types ¶
This section is empty.