config

package
v0.0.0-...-799cb51 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// FakeHeaders 默认http请求使用的响应头
	FakeHeaders map[string]string
	// Logger zap的logger对象,定义一个全局的log供所有其他包使用,并且在init函数里初始化,这样所有包中调用也只会执行一次
	Logger = &zap.Logger{}
	// Json jsoniter库用于提高json解析速度的一个库,兼容标准库的json库
	JSON          = jsoniter.ConfigCompatibleWithStandardLibrary
	SugaredLogger *zap.SugaredLogger
)

FakeHeaders used for all http request.

Functions

func InitLogger

func InitLogger(logger **zap.Logger, newCfg zap.Config)

InitLogger 配置zap logger,修改普通变量的值要用到一级指针,那么修改一级指针变量的值就要用到二级指针

Types

This section is empty.

Jump to

Keyboard shortcuts

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