utils

package
v0.0.0-...-4d495be Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(b bool) *bool

BoolPtr returns a pointer to a bool

func Different

func Different(slice1 []string, slice2 []string) []string

Different returns the difference between two slices

func Float32Ptr

func Float32Ptr(f float32) *float32

Float32Ptr returns a pointer to the passed float32.

func GUNZIP

func GUNZIP(data []byte) ([]byte, *gzip.Header, error)

GUNZIP decompresses & outputs data from the GZIP format. Optional GZIP header metadata passed into the compressed data is also returned.

func GZIP

func GZIP(data []byte, header *gzip.Header) ([]byte, error)

GZIP compresses & outputs data in the GZIP format. Optional GZIP header metadata can be passed into the compressed data.

func GetEnvironment

func GetEnvironment() string

GetEnvironment return the current environment name

func Hash

func Hash(text string) string

Hash the text using MD5

func Intersect

func Intersect(slice1 []string, slice2 []string) []string

Intersect returns the intersection of two slices

func StringPtr

func StringPtr(s string) *string

StringPtr returns a pointer to the passed string.

func UnmarshalMapInto

func UnmarshalMapInto(m map[string]interface{}, v interface{}) error

UnmarshalMapInto (json) marshals m & (json) unmarshals it into v.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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