refactor
This commit is contained in:
22
pkg/clock/cmd/main.go
Normal file
22
pkg/clock/cmd/main.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"git.niplace.ru/XoxJlopeZi4BB/clock"
|
||||
)
|
||||
|
||||
func main() {
|
||||
addrwithport := ":8080"
|
||||
http.HandleFunc("/",
|
||||
func(w http.ResponseWriter, req *http.Request) {
|
||||
clock.Time(w)
|
||||
},
|
||||
)
|
||||
|
||||
println("this thingy running on", addrwithport)
|
||||
err := http.ListenAndServe(addrwithport, nil)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user