Original post

If you’re working with the net/http package, you can easily create a router to pass different http calls to different functions. A logger allows you to keep track of these calls. In this example, we just log the call to the terminal (or stdout). To use this logger wrap any handlers you have with Logger().
package main import ( “io” “log” “net/http” “time” ) func main() { // Specify our ExampleHandler and wrap the Logger around it.