Skip to content

Instantly share code, notes, and snippets.

@jochasinga
Created March 16, 2015 14:30
Show Gist options
  • Select an option

  • Save jochasinga/3e30c3a8ec6b9e074b17 to your computer and use it in GitHub Desktop.

Select an option

Save jochasinga/3e30c3a8ec6b9e074b17 to your computer and use it in GitHub Desktop.
Main function for Blog API
package main
import (
"log"
"net/http"
)
func main() {
router := NewRouter()
log.Fatal(http.ListenAndServe(":8080", router))
}
func HandleError(err error) {
if err != nil {
panic(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment