whprintf/main.go

23 lines
303 B
Go
Raw Permalink Normal View History

2021-10-14 18:27:22 +03:00
package main
import (
"log"
"net/http"
"os"
)
func main() {
go processSignals()
addr := ":8080"
if len(os.Args) > 1 {
addr = os.Args[1]
}
log.Printf("Listening %s...\n\n", addr)
err := http.ListenAndServe(addr, NewHandler())
if err != nil {
log.Fatal(err)
}
}