Use vendored go-swagger (#8087)

* Use vendored go-swagger

* vendor go-swagger

* revert un wanteed change

* remove un-needed GO111MODULE

* Update Makefile

Co-Authored-By: techknowlogick <matti@mdranta.net>
This commit is contained in:
Antoine GIRARD 2019-09-04 21:53:54 +02:00 committed by Lauris BH
parent 4cb1bdddc8
commit 9fe4437bda
686 changed files with 143379 additions and 17 deletions

12
vendor/github.com/go-openapi/runtime/logger/logger.go generated vendored Normal file
View file

@ -0,0 +1,12 @@
package logger
import "os"
type Logger interface {
Printf(format string, args ...interface{})
Debugf(format string, args ...interface{})
}
func DebugEnabled() bool {
return os.Getenv("SWAGGER_DEBUG") != "" || os.Getenv("DEBUG") != ""
}

View file

@ -0,0 +1,22 @@
package logger
import (
"fmt"
"os"
)
type StandardLogger struct{}
func (StandardLogger) Printf(format string, args ...interface{}) {
if len(format) == 0 || format[len(format)-1] != '\n' {
format += "\n"
}
fmt.Fprintf(os.Stderr, format, args...)
}
func (StandardLogger) Debugf(format string, args ...interface{}) {
if len(format) == 0 || format[len(format)-1] != '\n' {
format += "\n"
}
fmt.Fprintf(os.Stderr, format, args...)
}