This commit is contained in:
root 2018-11-03 01:54:41 +00:00
parent 15797d1823
commit 00ee69ad0c

View File

@ -87,7 +87,7 @@ func Start(host string, port int) error {
addr = strings.Replace(addr, "0.0.0.0", "", 1) addr = strings.Replace(addr, "0.0.0.0", "", 1)
host = strings.Replace(host, "0.0.0.0", "127.0.0.1", 1) host = strings.Replace(host, "0.0.0.0", "127.0.0.1", 1)
} }
fmt.Printf("server start on: %s", fmt.Sprintf("http://%s:%d", host, port)) fmt.Printf("server start on: %s\n", fmt.Sprintf("http://%s:%d", host, port))
if err := http.ListenAndServe(addr, nil); err != nil { if err := http.ListenAndServe(addr, nil); err != nil {
return fmt.Errorf("ListenAndServe: : %v", err) return fmt.Errorf("ListenAndServe: : %v", err)