fix: NowHandler outputs format
This commit is contained in:
2
main.go
2
main.go
@@ -32,6 +32,6 @@ func HomeHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
func TimeHandler(w http.ResponseWriter, r *http.Request) {
|
func TimeHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
res := now.GoString()
|
res := now.Format(time.RFC3339Nano)
|
||||||
fmt.Fprint(w, res)
|
fmt.Fprint(w, res)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user