imhinotori / go-jsend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-jsend

A very simple implementation of JSend specification on Go

Getting Started

Installing

go get github.com/imhinotori/go-jsend

Usage

Success:

jsend.Success(data)

Fail:

jsend.Fail(data)

Error (Message Only):

jsend.Fail(message)

Error (Message & Code):

jsend.ErrorWithCode(message, code)

Error (Message & Data):

jsend.ErrorWithData(message, data)

Error (Message, Code & Data)

jsend.ErrorFull(message, code, data)

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

About

License:MIT License


Languages

Language:Go 100.0%