x

package
v0.0.0-...-0ae59ff Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertTrue

func AssertTrue(b bool)

AssertTrue asserts that b is true. Otherwise, it would log fatal.

func AssertTruef

func AssertTruef(b bool, format string, args ...interface{})

AssertTruef is AssertTrue with extra info.

func AssertTruefNoTrace

func AssertTruefNoTrace(b bool, format string, args ...interface{})

func Check

func Check(err error)

Check logs fatal if err != nil.

func Check2

func Check2(_ interface{}, err error)

Check2 acts as convenience wrapper around Check, using the 2nd argument as error.

func Checkf

func Checkf(err error, format string, args ...interface{})

Checkf is Check with extra info.

func CheckfNoTrace

func CheckfNoTrace(err error)

func Errorf

func Errorf(format string, args ...interface{}) error

Errorf creates a new error with stack trace, etc.

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf logs fatal.

func Hmac

func Hmac(key []byte, data []byte) string

func HmacByStringKey

func HmacByStringKey(key string, data []byte) string

func HmacString

func HmacString(key string, data string) string

func Md5

func Md5(data []byte) string

func Md5String

func Md5String(data string) string

func Sha1

func Sha1(data []byte) string

func Sha1String

func Sha1String(data string) string

func Wrap

func Wrap(err error) error

Wrap wraps errors from external lib.

func Wrapf

func Wrapf(err error, format string, args ...interface{}) error

Wrapf is Wrap with extra info.

Types

type Options

type Options struct {
	DebugMode      bool
	PortOffset     int
	QueryEdgeLimit uint64
}
var Config Options

Jump to

Keyboard shortcuts

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