diff --git a/README.md b/README.md index 7c6efd0..0b5bea9 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ func main() { buf, err := c.ReadAll() if err != nil { c.Error(err) + return } // writes something as response c.String(string(buf)) diff --git a/example/server/main.go b/example/server/main.go index a1b4bd4..7440a41 100644 --- a/example/server/main.go +++ b/example/server/main.go @@ -13,6 +13,7 @@ func main() { body, err := c.ReadAll() if err != nil { c.Error(err) + return } log.Println(string(body)) c.String("read") diff --git a/example/start/start.go b/example/start/start.go index 75a8089..4126f34 100644 --- a/example/start/start.go +++ b/example/start/start.go @@ -15,6 +15,7 @@ func main() { buf, err := c.ReadAll() if err != nil { c.Error(err) + return } // writes something as response c.String(string(buf))