From c6ae08aa58ef52ff7108b95e185b291ea764b647 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Thu, 30 Mar 2017 16:21:28 +0800 Subject: [PATCH] update return style Signed-off-by: Bo-Yi Wu --- context.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/context.go b/context.go index 923bb885..f519e5bb 100644 --- a/context.go +++ b/context.go @@ -447,9 +447,8 @@ func (c *Context) GetHeader(key string) string { } // GetRawData return stream data -func (c *Context) GetRawData() (body []byte, err error) { - body, err = ioutil.ReadAll(c.Request.Body) - return +func (c *Context) GetRawData() ([]byte, error) { + return ioutil.ReadAll(c.Request.Body) } func (c *Context) SetCookie(