util

package
v0.0.0-...-dab46ad Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close .

func CloserAdd

func CloserAdd(level int, event func() (errs []error))

CloserAdd 添加关闭事件 level 等级越低越先关闭

func Inject

func Inject(handler func(err error))

Inject 关闭时发生错误处理方法

func IsProd

func IsProd() bool

IsProd 是否生产环境

func JSON

func JSON(data interface{}) []byte

JSON 屏蔽错误返回json字节

func JSONWithColor

func JSONWithColor(data interface{}) []byte

JSONWithColor 屏蔽错误返回json格式化带颜色字节

func PrintJSONWithColor

func PrintJSONWithColor(data interface{})

PrintJSONWithColor .

Types

This section is empty.

Jump to

Keyboard shortcuts

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