Skip to content

Instantly share code, notes, and snippets.

@kamal-kambe
Last active August 1, 2019 06:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kamal-kambe/a93f1841e9ccb4b39b135857094211a5 to your computer and use it in GitHub Desktop.
Save kamal-kambe/a93f1841e9ccb4b39b135857094211a5 to your computer and use it in GitHub Desktop.
package api
import (
"net/http"
"strconv"
"sample-app/service"
"sample-app/util"
)
type base struct {
service.Base
}
func NewBase(f service.BaseFactory) *base {
return &base{
f.NewBase(),
}
}
func (b *base) GameData() http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
jsonResp := b.GetData()
w.Write(jsonResp)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment