return on error
This commit is contained in:
parent
07af98f40b
commit
e6c599461d
@ -33,6 +33,7 @@ func newHandler(name string) http.Handler {
|
|||||||
duration, err := time.ParseDuration(r.FormValue("duration"))
|
duration, err := time.ParseDuration(r.FormValue("duration"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, err.Error(), 400)
|
http.Error(w, err.Error(), 400)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
time.Sleep(duration)
|
time.Sleep(duration)
|
||||||
fmt.Fprintf(
|
fmt.Fprintf(
|
||||||
|
Loading…
Reference in New Issue
Block a user