Hello world/Web server: Difference between revisions

→‎{{header|Go}}: replace Go version with a more idiomatic one
(→‎{{header|Go}}: replace Go version with a more idiomatic one)
Line 392:
 
import (
"fmt"
"log"
"net/http"
)
 
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
fmt.Fprintln(w, "Goodbye, World!")
func(w http.ResponseWriter, req *http.Request) {
})
fmt.Fprintln(w, "Goodbye, World!")
if err := log.Fatal(http.ListenAndServe(":8080", nil); err != nil {)
})
}
if err := http.ListenAndServe(":8080", nil); err != nil {
}</lang>
fmt.Println(err)
}
}</lang>
 
=={{header|Haskell}}==
Anonymous user