Adds shortcut for disabling bind validation.

This commit is contained in:
Manu Mtz-Almeida 2015-05-31 17:03:15 +02:00
parent 0c9f086b74
commit 0d1b9856ed
1 changed files with 5 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import (
"io" "io"
"os" "os"
"github.com/gin-gonic/gin/binding"
"github.com/mattn/go-colorable" "github.com/mattn/go-colorable"
) )
@ -51,6 +52,10 @@ func SetMode(value string) {
modeName = value modeName = value
} }
func DisableBindValidation() {
binding.Validator = nil
}
func Mode() string { func Mode() string {
return modeName return modeName
} }