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 - master
matrix: matrix:
allow_failures:
- go: master
fast_finish: true fast_finish: true
git: git:

View File

@ -8,6 +8,7 @@ import (
"bytes" "bytes"
"fmt" "fmt"
"html/template" "html/template"
"os"
"runtime" "runtime"
"strconv" "strconv"
"strings" "strings"
@ -50,7 +51,7 @@ func debugPrintLoadTemplate(tmpl *template.Template) {
func debugPrint(format string, values ...interface{}) { func debugPrint(format string, values ...interface{}) {
if IsDebugging() { 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) SetMode(TestMode)
}) })
m, e := getMinVer(runtime.Version()) m, e := getMinVer(runtime.Version())
assert.Nil(t, e) if e == nil && m <= ginSupportMinGoVer {
if 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) 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 { } else {
assert.Equal(t, "[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re) assert.Equal(t, "[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.\n\n", re)