Skip to content

Instantly share code, notes, and snippets.

@yoggy
Created February 25, 2015 13:14
Show Gist options
  • Select an option

  • Save yoggy/401f8e36d2a69d5ff9f0 to your computer and use it in GitHub Desktop.

Select an option

Save yoggy/401f8e36d2a69d5ff9f0 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"net/http"
)
func testHandler(w http.ResponseWriter, req *http.Request) {
fmt.Fprintln(w, "/test handler")
}
func main() {
http.HandleFunc("/test", testHandler)
http.Handle("/", http.FileServer(http.Dir("./assets/")))
http.ListenAndServe(":8080", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment