So. I have started a real blog.
hello world
Did you see that cool header image? It took almost 2 hours and an absurdly complicated Node.js program.
Here is a hello world program in go:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | package main import ( "fmt" "net/http" ) func hello(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello, %s!", r.URL.Path[1:]) } func main() { http.HandleFunc("/", hello) http.ListenAndServe(":8000", nil) } |