Last active
August 1, 2019 06:48
-
-
Save kamal-kambe/a93f1841e9ccb4b39b135857094211a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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