package main import ( "fmt" "net/http" ) func main() { http.Handle("/", http.FileServer(http.Dir("./wwwdata/"))) http.HandleFunc("/mything", handleSomething) if err := http.ListenAndServe(":8088", nil); err != http.ErrServerClosed { fmt.Printf("Ouch, server closed: %v\n", err) } } func handleSomething(w http.ResponseWriter, r *http.Request) { fmt.Println("Wohooo, a request!") }