Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

Files

Latest commit

author
personal-security
Sep 3, 2021
db4310a · Sep 3, 2021

History

History
57 lines (38 loc) · 1.03 KB

README.md

File metadata and controls

57 lines (38 loc) · 1.03 KB

easy-sdk-go Build Status

A set of simple functions to make life easier.

Install

go get -u "github.com/personal-security/easy-sdk-go"

Finctions

Listing functions is dev.

Example Rest Answer

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)
}

Links

pkg.go.dev