github.com/shogo-ma/goa@v1.3.1/encoding/form/encoding.go (about) 1 /* 2 Package form provides a "application/x-www-form-encoding" encoder and decoder. It uses 3 github.com/ajg/form for the actual implementation which can be used directly as well. The goal of 4 this package is to raise awareness of the package above and its direct compatibility with goa. 5 */ 6 package form 7 8 import ( 9 "io" 10 11 "github.com/ajg/form" 12 "github.com/goadesign/goa" 13 ) 14 15 // NewEncoder returns a form encoder that writes to w. 16 func NewEncoder(w io.Writer) goa.Encoder { 17 return form.NewEncoder(w) 18 } 19 20 // NewDecoder returns a form decoder that reads from r. 21 func NewDecoder(r io.Reader) goa.Decoder { 22 return form.NewDecoder(r) 23 }