Collapsing tree into more sane Go project layout
since I was in here looking at something unrelated...
This commit is contained in:
19
gotime/gotour-artifacts/hello-web/main.go
Normal file
19
gotime/gotour-artifacts/hello-web/main.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user