Using log.Panic instead

This commit is contained in:
Manu Mtz-Almeida
2015-03-23 05:50:10 +01:00
parent 34b1d0262e
commit 3e3ced70d4
6 changed files with 15 additions and 12 deletions

View File

@ -8,6 +8,7 @@ import (
"encoding/json"
"encoding/xml"
"errors"
"log"
"net/http"
"reflect"
"strconv"
@ -203,7 +204,7 @@ func setWithProperType(valueKind reflect.Kind, val string, structField reflect.V
// https://github.com/codegangsta/martini-contrib/pull/34#issuecomment-29683659
func ensureNotPointer(obj interface{}) {
if reflect.TypeOf(obj).Kind() == reflect.Ptr {
panic("Pointers are not accepted as binding models")
log.Panic("Pointers are not accepted as binding models")
}
}