common

package
v0.0.0-...-bda44bd Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwaitExit

func AwaitExit()

func FindString

func FindString(needle string, haystack []string) bool

FindString returns true if needle is in haystack

Types

type GetenvValue

type GetenvValue struct {
	// contains filtered or unexported fields
}

GetenvValue is a holder type for Getenv to translate any Getenv strings to real types

func Getenv

func Getenv(key string, defaultValue ...string) GetenvValue

func (GetenvValue) Bool

func (g GetenvValue) Bool() bool

func (GetenvValue) JSON

func (g GetenvValue) JSON(target interface{}) error

func (GetenvValue) Number

func (g GetenvValue) Number() int

func (GetenvValue) OrFatal

func (g GetenvValue) OrFatal() GetenvValue

func (GetenvValue) SafeURL

func (g GetenvValue) SafeURL() string

SafeURL removes any trailing slash

func (GetenvValue) String

func (g GetenvValue) String() string

func (GetenvValue) StringSlice

func (g GetenvValue) StringSlice(optionalDelimiter ...string) []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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