Skip to content
Snippets Groups Projects
Commit e8edf67a authored by Aksel Baardsen's avatar Aksel Baardsen
Browse files

diag uptime is now int instead of float

parent a775aa99
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,7 @@ func main() { ...@@ -25,7 +25,7 @@ func main() {
c.Path("/species/{speciesKey}"). c.Path("/species/{speciesKey}").
HandlerFunc(handler.Shandler) HandlerFunc(handler.Shandler)
c.Path("/diag"). c.Path("/diag/").
HandlerFunc(handler.Dhandler) HandlerFunc(handler.Dhandler)
http.Handle("/", r) http.Handle("/", r)
......
...@@ -17,7 +17,7 @@ type Diag struct { ...@@ -17,7 +17,7 @@ type Diag struct {
Gbif int `json:"gbif"` Gbif int `json:"gbif"`
Restcountries int `json:"restcountries"` Restcountries int `json:"restcountries"`
Version string `json:"version"` Version string `json:"version"`
Uptime float64 `json:"uptime"` Uptime int `json:"uptime"`
} }
func GetDiag(d* Diag) { func GetDiag(d* Diag) {
...@@ -50,5 +50,5 @@ func getVersion(d *Diag) { ...@@ -50,5 +50,5 @@ func getVersion(d *Diag) {
// Returns application uptime in seconds // Returns application uptime in seconds
func getUptime(d *Diag) { func getUptime(d *Diag) {
up := time.Since(startTime).Seconds() up := time.Since(startTime).Seconds()
d.Uptime = up d.Uptime = int(up)
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment