util

package
v0.0.0-...-aec784a Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package util provides some common utilities for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvBoolOr

func GetEnvBoolOr(env string, defaultValue bool) bool

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

func GetEnvIntOr(env string, defaultValue int) int

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

func GetEnvOr(env string, defaultValue string) string

GetEnvOr returns an environment variable specified by env, or returns defaultValue if the environment variable is not defined.

func MustAtoi

func MustAtoi(s string) int

MustAtoi returns an int or raises panic.

func MustConvert32B

func MustConvert32B(p []byte) [32]byte

MustConvert32B returns a byte array or raises panic.

func MustConvert64B

func MustConvert64B(p []byte) [64]byte

MustConvert64B returns a byte array or raises panic.

func MustConvert80B

func MustConvert80B(p []byte) [80]byte

MustConvert80B returns a byte array or raises panic.

func MustDecodeHexString

func MustDecodeHexString(s string) []byte

MustDecodeHexString returns a decoded string or raises panic.

Types

This section is empty.

Jump to

Keyboard shortcuts

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