Jeffrey Paul
61228b4586
Some checks failed
continuous-integration/drone/push Build is failing
Co-authored-by: sneak <sneak@sneak.berlin> Reviewed-on: #14
16 lines
267 B
Go
16 lines
267 B
Go
package server
|
|
|
|
import (
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
func (s *server) handleNow() http.HandlerFunc {
|
|
type response struct {
|
|
Now time.Time `json:"now"`
|
|
}
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
s.respondJSON(w, r, &response{Now: time.Now()}, 200)
|
|
}
|
|
}
|