demo code smell

This commit is contained in:
Naitik Shah 2013-03-25 14:51:46 -07:00
parent 0109b3fb52
commit 308a01b46b

View File

@ -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
}