Skip to content

Instantly share code, notes, and snippets.

@sascha
Created August 10, 2015 09:24
Show Gist options
  • Save sascha/24650389ea218e6e2c09 to your computer and use it in GitHub Desktop.
Save sascha/24650389ea218e6e2c09 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"net/http"
)
const (
port = ":8080"
)
func HelloWorld(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello World")
}
func init() {
http.HandleFunc("/", HelloWorld)
http.ListenAndServe(port, nil)
}
func main() {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment