github.com/go-playground/pkg/v5@v5.29.1/net/http/form.go (about)

     1  package httpext
     2  
     3  import (
     4  	"net/url"
     5  
     6  	"github.com/go-playground/form/v4"
     7  )
     8  
     9  // FormDecoder is the type used for decoding a form for use
    10  type FormDecoder interface {
    11  	Decode(interface{}, url.Values) error
    12  }
    13  
    14  // FormEncoder is the type used for encoding form data
    15  type FormEncoder interface {
    16  	Encode(interface{}) (url.Values, error)
    17  }
    18  
    19  var (
    20  	// DefaultFormDecoder of this package, which is configurable
    21  	DefaultFormDecoder FormDecoder = form.NewDecoder()
    22  
    23  	// DefaultFormEncoder of this package, which is configurable
    24  	DefaultFormEncoder FormEncoder = form.NewEncoder()
    25  )