Skip to content

Releases: go-playground/lars

Release 3.2.0

08 Jul 14:19
Compare
Choose a tag to compare

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

02 Jun 18:43
Compare
Choose a tag to compare

What Changed?

Added Decode() to the Context object for JSON, XML, FORM + Multipart FORM decoding into a struct.

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

26 May 15:40
Compare
Choose a tag to compare

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

13 Apr 00:42
Compare
Choose a tag to compare

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 )