tools

package
v0.0.0-...-532604b Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(path string) map[string]string

读取配置文件

Types

type ResultUtil

type ResultUtil struct {
	//返回0 成功
	//返回-1 缺少参数
	//返回-2 参数不合法
	//返回-3 请求失败
	//返回-4 非法用户
	Code int
	Msg  string
	// 定义空接口以支持泛型
	Data interface{}
}

func NewResult

func NewResult() *ResultUtil

func NewResultError

func NewResultError(code int, msg string) *ResultUtil

func NewResultSuccess

func NewResultSuccess(data interface{}) *ResultUtil

func NewResultUtil

func NewResultUtil(code int, msg string, data interface{}) *ResultUtil

Jump to

Keyboard shortcuts

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