/
githubmirror
/
gin
Обзор
Документация
Войти
/
githubmirror
/
gin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v1.2
binding/xml.go
24 строки
491 B
Manu Mtz-Almeida
Removes unused underscore
10 июл 2015, 14:06
10 июл 2015, 14:06
0494e1b
Код
Авторство
О чём код?
// Copyright 2014 Manu Martinez-Almeida. All rights reserved. // Use of this source code is governed by a MIT style // license that can be found in the LICENSE file. package binding import ( "encoding/xml" "net/http" ) type xmlBinding struct{} func (xmlBinding) Name() string { return "xml" } func (xmlBinding) Bind(req *http.Request, obj interface{}) error { decoder := xml.NewDecoder(req.Body) if err := decoder.Decode(obj); err != nil { return err } return validate(obj) }