package main import ( "net/http" "runtime" ) func main() { runtime.GOMAXPROCS(runtime.NumCPU()) handler := func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("hello world\n")) } http.ListenAndServe(":8000", http.HandlerFunc(handler)) }