RosettaCodeData/Task/Hello-world-Web-server/Go/hello-world-web-server.go

15 lines
234 B
Go
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
package main
import (
2014-01-17 05:32:22 +00:00
"fmt"
"log"
"net/http"
2013-04-10 21:29:02 -07:00
)
func main() {
2014-01-17 05:32:22 +00:00
http.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
fmt.Fprintln(w, "Goodbye, World!")
})
log.Fatal(http.ListenAndServe(":8080", nil))
2013-04-10 21:29:02 -07:00
}