Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 418 Bytes

README.md

File metadata and controls

17 lines (13 loc) · 418 Bytes

JSON API Response for Go

Installation

go get github.com/Girein/json-api-response-go

Usage

In the example below, I'm using the Echo web framework.

import pretty "github.com/Girein/json-api-response-go"

func Hello(c echo.Context) error {
    response := new(pretty.JSONResponse)
    response.Simple("200", "OK", "Hello World!")

    return c.JSON(200, response)
}