mirror of https://github.com/maxcnunes/gaper.git
18 lines
306 B
Go
18 lines
306 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"html"
|
|
"log"
|
|
"net/http"
|
|
)
|
|
|
|
func main() {
|
|
http.HandleFunc("/bar", func(w http.ResponseWriter, r *http.Request) {
|
|
fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path)) // nolint gas
|
|
})
|
|
|
|
log.Println("Starting server")
|
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
|
}
|