16 lines
256 B
Go
16 lines
256 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func handler(w http.ResponseWriter, r *http.Request) {
|
||
|
fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:])
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
http.HandleFunc("/", handler)
|
||
|
http.ListenAndServe(":8000", nil)
|
||
|
}
|