helpers

package
v0.0.0-...-875a7fa Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2017 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddSlashIfNeeded

func AddSlashIfNeeded(url string) string

func Bytestouint32

func Bytestouint32(b []byte) uint32

func CheckMapHasKey

func CheckMapHasKey(inputMap map[string]interface{}, key string) string

func DecodeBytesToInt

func DecodeBytesToInt(b []byte) int

func DecodeBytesToInterface

func DecodeBytesToInterface(b []byte, dest interface{}) error

func EncodeIntToBytes

func EncodeIntToBytes(v int) []byte

func EncodeInterfaceToBytes

func EncodeInterfaceToBytes(v interface{}) ([]byte, error)

func EnsureDir

func EnsureDir(path string)

func FileExistsFn

func FileExistsFn(basepath, filename string) bool

func GetLastSplit

func GetLastSplit(s string) string

URLS ARE AN ENTIRELY REASONABLE WAY TO SEND IDS

func GetSecondLastSplit

func GetSecondLastSplit(s string) string

func MarshalValue

func MarshalValue(value interface{}) ([]byte, error)

func NewThrottler

func NewThrottler(allowed int) chan struct{}

newThrottler creates throttler that gives out resources up to allowed. Resources must be returned by re-sending on the channel.

func Uin32tobytes

func Uin32tobytes(num uint32) []byte

Types

This section is empty.

Directories

Path Synopsis
lz4
tar

Jump to

Keyboard shortcuts

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