This commit is contained in:
zhouwentao 2026-01-02 18:29:51 +08:00
parent 43005cdb13
commit 11b467bd56
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
server: server:
port: 8080 port: 8081
log: log:
level: debug level: debug

View File

@ -103,9 +103,9 @@ func main() {
// 启动服务器 // 启动服务器
go func() { go func() {
common.Info("服务器启动: http://localhost:8080") common.Info("服务器启动: http://localhost:%d", port)
common.Info("Swagger文档: http://localhost:8080/swagger/index.html") common.Info("Swagger文档: http://localhost:%d/swagger/index.html", port)
log.Println("服务器启动: http://localhost:8080") log.Printf("服务器启动: http://localhost:%d\n", port)
if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed { if err := srv.ListenAndServe(); err != nil && err != http.ErrServerClosed {
common.LogError("启动失败: %s", err) common.LogError("启动失败: %s", err)
log.Fatalf("启动失败: %s\n", err) log.Fatalf("启动失败: %s\n", err)