util

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: BSD-3-Clause Imports: 10 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareJSON

func CompareJSON(j1, j2 string) bool

func FormatPkixSubject

func FormatPkixSubject(s *pkix.Name) string

FormatPkixSubject returns a string representing x509 cert subject/issuer

func GetEnvBool

func GetEnvBool(envVariable string, defaultValue ...bool) bool

GetEnvBool returns value of the environment variable if it exists, or defaultValue if not

func GetFreeTcpPort

func GetFreeTcpPort(preferredPort int) int

func IsTruthyEnv

func IsTruthyEnv(envName string) bool

IsTruthyEnv returns true for any value not "false", "0", "no..."

func MinInt

func MinInt(a, b int) int

MinInt returns the minimum of two ints.

func SendHttpRequest

func SendHttpRequest(
	method, url,
	payload string,

	headers ...[]string,
) (int, string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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