function

package
v0.0.0-...-3d40e9a Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultHandleStr

func DefaultHandleStr(data interface{}, defaultStr string) string

* 格式化数据处理 @data object @defaultStr string

func FunMd5

func FunMd5(str string) string

func Str2Int

func Str2Int(source string) int

string to int @param source 字符串

Types

type BaseResponseInfo

type BaseResponseInfo struct {
	// 状态码
	Code int64 `json:"code"`

	// 数据结构体
	Data interface{} `json:"data"`

	// 数据信息
	Msg string `json:"msg"`
}

func FunJsonError

func FunJsonError(code int64, data interface{}, msg string) BaseResponseInfo

func FunJsonErrorNormal

func FunJsonErrorNormal(msg string) BaseResponseInfo

*

  • 一般错误返回
  • @param msg string

func FunJsonSuccess

func FunJsonSuccess(data interface{}, msg string) BaseResponseInfo

func FunJsonSuccessNormal

func FunJsonSuccessNormal(data interface{}) BaseResponseInfo

Jump to

Keyboard shortcuts

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