github.com/songzhibin97/gkit@v1.2.13/tools/bind/option.go (about) 1 package bind 2 3 import "github.com/songzhibin97/gkit/options" 4 5 var defaultParse = []Binding{Query, FormPost, Header} 6 7 func DefaultParse(contentType string) []Binding { 8 return append(defaultParse, contentTypeSelect(contentType)) 9 } 10 11 func SetSelectorParse(bind []Binding) options.Option { 12 return func(o interface{}) { 13 o.(*all).selectorParse = bind 14 } 15 }