Skip to content

Releases: go-playground/form

Release 1.4.0

21 Jun 03:37

Choose a tag to compare

What's New?

Added Encoder to go along with the Decoder.

example

Notes

To maximize compatibility with other systems the Encoder attempts
to avoid using array indexes in url.Values if at all possible.

eg.

// A struct field of
Field []string{"1", "2", "3"}

// will be output a url.Value as
"Field": []string{"1", "2", "3"}

and not
"Field[0]": []string{"1"}
"Field[1]": []string{"2"}
"Field[2]": []string{"3"}

// however there are times where it is unavoidable, like with pointers
i := int(1)
Field []*string{nil, nil, &i}

// to avoid index 1 and 2 must use index
"Field[2]": []string{"1"}

Release 1.3.0

16 Jun 08:25

Choose a tag to compare

What's New?

  • Added usage of DecodeCustomTypeFunc within map keys so custom types will also apply to map keys.

Release 1.2.1

14 Jun 02:31

Choose a tag to compare

What Changed?

  • fixed bug in array struct assignment, fixed in commit d77a15c thanks @falun

Release 1.2.0

13 Jun 14:32

Choose a tag to compare

What Changes

  • Changed to use parseBool in util.go for performance + simpler code.
  • Reorganized some code for better readability.

Release 1.1.1

02 Jun 15:03

Choose a tag to compare

What's New?

  • Added Fallback boolean values on, off, yes, no, ok that are not handled by the default strconv.ParseBool(...)

Release 1.0

31 May 22:00

Choose a tag to compare

Welcome to the Release of form

parses url.Values and fills a struct with values, creating objects as necessary

Why another Form Parser

I was not satisfied with the shortcoming of some of the other libraries/packages out there i.e.

  • No map support
  • No pointer support (important for linked lists)
  • Efficiency issues
  • Needed a Form parser for lars, so now I have one to add.