update
This commit is contained in:
parent
15797d1823
commit
00ee69ad0c
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user