Created
December 28, 2014 18:07
-
-
Save nguyendangminh/63b8ed70cb0e086b4d4a to your computer and use it in GitHub Desktop.
Gist for Golang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Logging | |
import ( | |
"log" | |
"time" | |
) | |
func response(rw http.ResponseWriter, r *http.Request) { | |
rw.Write([]byte("Hello world!")) | |
log.Printf(time.Now().String(), r.Method, r.URL.String()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment