44999623da
since I was in here looking at something unrelated...
20 lines
237 B
Go
20 lines
237 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
)
|
|
|
|
type Hello struct{}
|
|
|
|
func (h Hello) ServeHTTP(
|
|
w http.ResponseWriter,
|
|
r *http.Request) {
|
|
fmt.Fprint(w, "Hello!\n")
|
|
}
|
|
|
|
func main() {
|
|
var h Hello
|
|
http.ListenAndServe("localhost:4000", h)
|
|
}
|