forked from loafle/openapi-generator-original
removed tab in logger, added warnings for import
This commit is contained in:
parent
4b41877419
commit
6415018c8f
@ -13,7 +13,7 @@ func Logger(inner http.Handler, name string) http.Handler {
|
|||||||
inner.ServeHTTP(w, r)
|
inner.ServeHTTP(w, r)
|
||||||
|
|
||||||
log.Printf(
|
log.Printf(
|
||||||
"%s\t%s\t%s\t%s",
|
"%s %s %s %s",
|
||||||
r.Method,
|
r.Method,
|
||||||
r.RequestURI,
|
r.RequestURI,
|
||||||
name,
|
name,
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
// WARNING!
|
||||||
|
// Change this to a fully-qualified import path
|
||||||
|
// once you place this file into your project.
|
||||||
|
// For example,
|
||||||
|
//
|
||||||
|
// sw "github.com/myname/myrepo/{{apiPath}}"
|
||||||
|
//
|
||||||
sw "./{{apiPath}}"
|
sw "./{{apiPath}}"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -13,7 +13,7 @@ func Logger(inner http.Handler, name string) http.Handler {
|
|||||||
inner.ServeHTTP(w, r)
|
inner.ServeHTTP(w, r)
|
||||||
|
|
||||||
log.Printf(
|
log.Printf(
|
||||||
"%s\t%s\t%s\t%s",
|
"%s %s %s %s",
|
||||||
r.Method,
|
r.Method,
|
||||||
r.RequestURI,
|
r.RequestURI,
|
||||||
name,
|
name,
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
// WARNING!
|
||||||
|
// Change this to a fully-qualified import path
|
||||||
|
// once you place this file into your project.
|
||||||
|
// For example,
|
||||||
|
//
|
||||||
|
// sw "github.com/myname/myrepo/go"
|
||||||
|
//
|
||||||
sw "./go"
|
sw "./go"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user