15 lines
241 B
Go
15 lines
241 B
Go
package server
|
|
|
|
import (
|
|
"fmt"
|
|
"html"
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
|
fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path))
|
|
})
|
|
|
|
http.ListenAndServe(":8080", nil)
|
|
}
|