uri.go (399B)
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 any) error { 14 if err := mapURI(obj, m); err != nil { 15 return err 16 } 17 return validate(obj) 18 }