removed tab in logger, added warnings for import

This commit is contained in:
Guo Huang 2016-05-27 09:42:08 -07:00
parent 4b41877419
commit 6415018c8f
4 changed files with 16 additions and 2 deletions

View File

@ -13,7 +13,7 @@ func Logger(inner http.Handler, name string) http.Handler {
inner.ServeHTTP(w, r)
log.Printf(
"%s\t%s\t%s\t%s",
"%s %s %s %s",
r.Method,
r.RequestURI,
name,

View File

@ -1,6 +1,13 @@
package main
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}}"
"log"
"net/http"

View File

@ -13,7 +13,7 @@ func Logger(inner http.Handler, name string) http.Handler {
inner.ServeHTTP(w, r)
log.Printf(
"%s\t%s\t%s\t%s",
"%s %s %s %s",
r.Method,
r.RequestURI,
name,

View File

@ -1,6 +1,13 @@
package main
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"
"log"
"net/http"