demo code smell
This commit is contained in:
parent
0109b3fb52
commit
308a01b46b
@ -34,11 +34,13 @@ func newHandler(name string) http.Handler {
|
||||
http.Error(w, err.Error(), 400)
|
||||
}
|
||||
time.Sleep(duration)
|
||||
w.Write([]byte(fmt.Sprintf(
|
||||
fmt.Fprintf(
|
||||
w,
|
||||
"%s started at %s slept for %d nanoseconds.\n",
|
||||
name,
|
||||
now,
|
||||
duration.Nanoseconds())))
|
||||
duration.Nanoseconds(),
|
||||
)
|
||||
})
|
||||
return mux
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user