Skip to content

Commit

Permalink
Fix typos in context.go (#2551)
Browse files Browse the repository at this point in the history
  • Loading branch information
ihac committed Nov 11, 2020
1 parent 65ed60e commit 7742ff5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions context.go
Expand Up @@ -891,7 +891,7 @@ func (c *Context) SecureJSON(code int, obj interface{}) {
}

// JSONP serializes the given struct as JSON into the response body.
// It add padding to response body to request data from a server residing in a different domain than the client.
// It adds padding to response body to request data from a server residing in a different domain than the client.
// It also sets the Content-Type as "application/javascript".
func (c *Context) JSONP(code int, obj interface{}) {
callback := c.DefaultQuery("callback", "")
Expand Down Expand Up @@ -968,7 +968,7 @@ func (c *Context) DataFromReader(code int, contentLength int64, contentType stri
})
}

// File writes the specified file into the body stream in a efficient way.
// File writes the specified file into the body stream in an efficient way.
func (c *Context) File(filepath string) {
http.ServeFile(c.Writer, c.Request, filepath)
}
Expand Down

0 comments on commit 7742ff5

Please sign in to comment.