# README
API CMR
Use API CMR (Code + Message + Result) Specification, like jSend.
Installation
To install the package, run:
go get github.com/go-zoox/api-cmr
Getting Started
package main
import (
"github.com/go-zoox/api-cmr"
)
func main(t *testing.T) {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write(cmr.Success("Hello World!"))
// or
cmr.WriteSuccess(w, "Hello World!")
})
http.ListenAndServe(":8080", nil)
}
Inspired By
- omniti-labs/jsend - JSend is a specification for a simple, no-frills, JSON based format for application-level communication
License
GoZoox is released under the MIT License.