Skip to content

Instantly share code, notes, and snippets.

@nguyendangminh
Created December 28, 2014 18:07
Show Gist options
  • Save nguyendangminh/63b8ed70cb0e086b4d4a to your computer and use it in GitHub Desktop.
Save nguyendangminh/63b8ed70cb0e086b4d4a to your computer and use it in GitHub Desktop.
Gist for Golang
// 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