Merge branch 'master' into master

This commit is contained in:
James Pettyjohn 2018-09-30 11:54:34 -07:00 committed by GitHub
commit e090ffb269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View File

@ -10,8 +10,6 @@ go:
- master
matrix:
allow_failures:
- go: master
fast_finish: true
git:

View File

@ -8,6 +8,7 @@ import (
"bytes"
"fmt"
"html/template"
"os"
"runtime"
"strconv"
"strings"
@ -50,7 +51,7 @@ func debugPrintLoadTemplate(tmpl *template.Template) {
func debugPrint(format string, values ...interface{}) {
if IsDebugging() {
fmt.Printf("[GIN-debug] "+format, values...)
fmt.Fprintf(os.Stderr, "[GIN-debug] "+format, values...)
}
}

View File

@ -90,8 +90,7 @@ func TestDebugPrintWARNINGDefault(t *testing.T) {
SetMode(TestMode)
})
m, e := getMinVer(runtime.Version())
assert.Nil(t, e)
if m <= ginSupportMinGoVer {
if e == nil && m <= ginSupportMinGoVer {
assert.Equal(t, "[GIN-debug] [WARNING] Now Gin requires Go 1.6 or later and Go 1.7 will be required soon.\n\n[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)
} else {
assert.Equal(t, "[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)