utils

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrExit

func ErrExit(msg string, err error)

ErrExit is used to print error to stderr, and then exist with code 1.

func GenerateRandString

func GenerateRandString(n int) string

GenerateRandString creates a radom string with a fixed length.

func Marshal

func Marshal(i interface{}) (string, error)

Marshal is a fast struct serializing method. Compared with encoding/json, it is claimed to have a better performance.

func Unmarshal

func Unmarshal(s string, obj interface{}) error

Unmarshal is a fast struct deserializing method.

Types

This section is empty.

Jump to

Keyboard shortcuts

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