utils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(bs []byte) string

BytesToString convert byte slice to string

func GobDecode

func GobDecode(bs []byte, e interface{}) error

GobDecode decode byte slice to obj by gob

func GobDecodeString

func GobDecodeString(bs string, e interface{}) error

GobDecodeString decode string to obj by gob

func GobEncode

func GobEncode(e interface{}) ([]byte, error)

GobEncode encode obj by gob

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes convert string to byte slice

func Unzip added in v0.1.0

func Unzip(data []byte) ([]byte, error)

Unzip unzips data by gzip.

func Zip added in v0.1.0

func Zip(data []byte) (res []byte, err error)

Zip zips data by gzip.

Types

This section is empty.

Jump to

Keyboard shortcuts

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