go1.16 (#14783)
This commit is contained in:
parent
030646eea4
commit
47f6a4ec3f
947 changed files with 26119 additions and 7062 deletions
12
vendor/github.com/go-openapi/spec/debug.go
generated
vendored
12
vendor/github.com/go-openapi/spec/debug.go
generated
vendored
|
@ -18,14 +18,16 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"path"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// Debug is true when the SWAGGER_DEBUG env var is not empty.
|
||||
//
|
||||
// It enables a more verbose logging of this package.
|
||||
var Debug = os.Getenv("SWAGGER_DEBUG") != ""
|
||||
|
||||
var (
|
||||
// Debug is true when the SWAGGER_DEBUG env var is not empty.
|
||||
// It enables a more verbose logging of this package.
|
||||
Debug = os.Getenv("SWAGGER_DEBUG") != ""
|
||||
// specLogger is a debug logger for this package
|
||||
specLogger *log.Logger
|
||||
)
|
||||
|
@ -42,6 +44,6 @@ func debugLog(msg string, args ...interface{}) {
|
|||
// A private, trivial trace logger, based on go-openapi/spec/expander.go:debugLog()
|
||||
if Debug {
|
||||
_, file1, pos1, _ := runtime.Caller(1)
|
||||
specLogger.Printf("%s:%d: %s", filepath.Base(file1), pos1, fmt.Sprintf(msg, args...))
|
||||
specLogger.Printf("%s:%d: %s", path.Base(file1), pos1, fmt.Sprintf(msg, args...))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue