add version

pull/15/head v0.3.1
Karan Sharma 2021-03-03 10:23:26 +05:30
parent 06bee3f09c
commit 022c1267b7
1 changed files with 5 additions and 1 deletions

View File

@ -20,7 +20,11 @@ type httpResp struct {
} }
func handleIndexAPI(w http.ResponseWriter, r *http.Request) { func handleIndexAPI(w http.ResponseWriter, r *http.Request) {
sendResponse(w, http.StatusOK, "Welcome to Doggo API.") var (
app = r.Context().Value("app").(app.App)
)
sendResponse(w, http.StatusOK, fmt.Sprintf("Welcome to Doggo API. Version: %s", app.Version))
return return
} }