helpers

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolEnvOr

func BoolEnvOr(key string, defaul bool) bool

func BytesToUint64

func BytesToUint64(b []byte) uint64

func ContainsString

func ContainsString(this string, arr []string) bool

func ConvertMap

func ConvertMap(labels map[string]string) map[string]interface{}

func ConvertMapS

func ConvertMapS(labels map[string]interface{}) map[string]string

func EnvOr

func EnvOr(key string, defaul string) string

func FromBoolPointer

func FromBoolPointer(this *bool) bool

func FromIntPointer

func FromIntPointer(this *int) int

func FromStringPointer

func FromStringPointer(this *string) string

func Hash

func Hash(val []byte) string

func IntEnvOr

func IntEnvOr(key string, defaul int) int

func JSONString

func JSONString(obj interface{}) string

func MarshalJSON

func MarshalJSON(msg proto.Message) ([]byte, error)

func StringSliceEnvOr

func StringSliceEnvOr(key string, defaul []string) []string

func ToBoolPointer

func ToBoolPointer(this bool) *bool

func ToInt32Pointer

func ToInt32Pointer(value uint32) *int32

func ToIntPointer added in v0.0.30

func ToIntPointer(this int) *int

func ToStringPointer

func ToStringPointer(this string) *string

func ToTimePointer

func ToTimePointer(t time.Time) *time.Time

func Uint64ToBytes

func Uint64ToBytes(u uint64) []byte

func UnmarshalJSON

func UnmarshalJSON(bits []byte, msg proto.Message) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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