A set of simple functions to make life easier.
go get -u "github.com/personal-security/easy-sdk-go"
Listing functions is dev.
package controllers
import (
"net/http"
"rest-api/models"
"github.com/gorilla/mux"
easysdk "github.com/personal-security/easy-sdk-go"
)
var StatusGetNow = func(w http.ResponseWriter, r *http.Request) {
// CODE
resp := &easysdk.RespondApi{}
resp.Create(true, "Success")
resp.Respond(w)
}
or
package controllers
import (
"net/http"
"rest-api/models"
"github.com/gorilla/mux"
easysdk "github.com/personal-security/easy-sdk-go"
)
var StatusGetNow = func(w http.ResponseWriter, r *http.Request) {
// CODE
easysdk.GenerateApiRespond(w,true,"Success",nil)
}