helpers

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToUInt32

func BytesToUInt32(slice []byte) uint32

BytesToUInt32 convert byte slice to uint32

func BytesToUInt64

func BytesToUInt64(slice []byte) uint64

BytesToUInt64 convert byte slice to uint32

func ConcatByteArray

func ConcatByteArray(slices [][]byte) []byte

ConcatByteArray concat slice of bytes to single slice

func GetHash

func GetHash(in []byte) ([32]byte, error)

GetHash convert slice of bytes to limited slice

func HashIsEmpty

func HashIsEmpty(hash [32]byte) bool

HashIsEmpty check hash is empty

func SnakeCaseToCamelCase

func SnakeCaseToCamelCase(inputUnderScoreStr string) string

func ToHash

func ToHash(in []byte) [32]byte

ToHash convert slice to hash

func ToJSON

func ToJSON(obj interface{}) ([]byte, error)

ToJSON convert object to json byte slice

func UInt32ToBytes

func UInt32ToBytes(val uint32) []byte

UInt32ToBytes convert uint32 to LittleEndian byte slice

func UInt64ToBytes

func UInt64ToBytes(val uint64) []byte

UInt64ToBytes convert uint64 to byte slice

Types

type CaseInsensitiveReplacer

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

func NewCaseInsensitiveReplacer

func NewCaseInsensitiveReplacer(toReplace, replaceWith string) *CaseInsensitiveReplacer

func (*CaseInsensitiveReplacer) Replace

func (cir *CaseInsensitiveReplacer) Replace(str string) string

Jump to

Keyboard shortcuts

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