Releases: go-playground/lars
Releases · go-playground/lars
Release 3.2.0
What Changes?
- Set automatically handing of OPTION requests to false by default ( I was constantly forgetting it was on by default when I didn't want it to be ) can easily turn on by calling SetAutomaticallyHandleOPTIONS(true)
- some minor code cleanup for form decoder.
- Fixed some documentation typos.
Release 3.1
What Changed?
Added Decode() to the Context object for JSON, XML, FORM + Multipart FORM decoding into a struct.
- used newly created library form library
Example
For full example see here.
currently JSON, XML, FORM + Multipart Form's are support out of the box. Can add more by overriding the Decode method using your own Context.
// first argument denotes yes or no I would like URL query parameter fields
// to be included. i.e. 'id' in route '/user/:id' should it be included.
// run, then change to false and you'll see user.ID is not populated.
if err := c.Decode(true, maxBytes, &user); err != nil {
log.Println(err)
}
Release 3.0
What's New?
Changed Websocket implementation to "github.com/gorilla/websocket", that's it. Had to bump the version because it is a potential breaking change....
Release 2.7
What's New?
- Starting to do releases + notes ;)
- Reworked golang.org/x/net/context logic ( backward compatible of course ) and added some helper methods WithCancel, WithDeadline, WithTimeout and WithValue. When Go 1.7 comes out will update backend to seamlessly use http.Request's Context.
- Added Context() and WithContext(ctx context.Context) methods on lars's Context to get and set the context, mirroring how it will work on the Go 1.7 Request object.
- Change how request scoped variables are stored and accessed; replaces map[string]interface with golang.org/x/net/context, which is actually a little faster and will fit right into how Go 1.7 will do it ( this way I can keep lars compatible with standard http handlers )