github.com/hellobchain/third_party@v0.0.0-20230331131523-deb0478a2e52/gin/binding/uri.go (about) 1 // Copyright 2018 Gin Core Team. All rights reserved. 2 // Use of this source code is governed by a MIT style 3 // license that can be found in the LICENSE file. 4 5 package binding 6 7 type uriBinding struct{} 8 9 func (uriBinding) Name() string { 10 return "uri" 11 } 12 13 func (uriBinding) BindUri(m map[string][]string, obj interface{}) error { 14 if err := mapUri(obj, m); err != nil { 15 return err 16 } 17 return validate(obj) 18 }