util

package
v0.0.0-...-71f1bc8 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(data interface{}, code int, msg interface{}) *responseDTO

func CheckNeed

func CheckNeed(args ...interface{}) error

func Error

func Error(point interface{}) *responseDTO

func Fail

func Fail(code int, msg string) *responseDTO

func FormatToString

func FormatToString(vol interface{}) (string, error)

*

结构体转化为文本

@param: vol - 结构体
@return 结构体文本

func FormatToStruct

func FormatToStruct(chunk *string) (map[string]interface{}, error)

*

文本转换为结构体

@param:chunk - 文本信息
@return:结构体
@return:转化异常

func GeneratorUUID

func GeneratorUUID() string

*

生产UUID

@return:string - uuid信息

func ReadRealFile

func ReadRealFile(path string) (string, error)

*

读取文件

@param:path - 文件路径
@return:读取文件
@return:读取异常

func Success

func Success(data interface{}) *responseDTO

Types

This section is empty.

Jump to

Keyboard shortcuts

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