From 0370314c3f468ec19b6b689ccba07a7ca17a28ad Mon Sep 17 00:00:00 2001 From: YuleiLan Date: Fri, 21 Aug 2020 11:28:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B1=95=E7=A4=BA=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/api/server.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cmd/api/server.go b/cmd/api/server.go index 93b938a..6dc6a19 100644 --- a/cmd/api/server.go +++ b/cmd/api/server.go @@ -10,7 +10,6 @@ import ( "ferry/tools" config2 "ferry/tools/config" "fmt" - "io/ioutil" "log" "net/http" "os" @@ -100,10 +99,14 @@ func run() error { } } }() - content, _ := ioutil.ReadFile("./static/ferry.txt") - fmt.Println(string(content)) - fmt.Printf("%s Server Run http://127.0.0.1:%s/ \r\n", tools.GetCurrntTimeStr(), config2.ApplicationConfig.Port) - fmt.Printf("%s Swagger URL http://127.0.0.1:%s/swagger/index.html \r\n", tools.GetCurrntTimeStr(), config2.ApplicationConfig.Port) + fmt.Printf("%s Server Run http://%s:%s/ \r\n", + tools.GetCurrntTimeStr(), + config2.ApplicationConfig.Host, + config2.ApplicationConfig.Port) + fmt.Printf("%s Swagger URL http://%s:%s/swagger/index.html \r\n", + tools.GetCurrntTimeStr(), + config2.ApplicationConfig.Host, + config2.ApplicationConfig.Port) fmt.Printf("%s Enter Control + C Shutdown Server \r\n", tools.GetCurrntTimeStr()) // 等待中断信号以优雅地关闭服务器(设置 5 秒的超时时间) quit := make(chan os.Signal)