修复main.go入口的错误

This commit is contained in:
eson
2023-07-21 10:46:25 +08:00
parent 728aeb17e2
commit 4fbfd90c0d
5 changed files with 43 additions and 10 deletions

View File

@@ -3,6 +3,10 @@ package main
import (
"flag"
"fmt"
"net/http"
"time"
"fusenapi/utils/auth"
{{.importPackages}}
)
@@ -16,9 +20,9 @@ func main() {
conf.MustLoad(*configFile, &c)
c.Timeout = int64(time.Second * 15)
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
server := rest.MustNewServer(c.RestConf, rest.WithCustomCors(auth.FsCors, func(w http.ResponseWriter) {
}))
defer server.Stop()
ctx := svc.NewServiceContext(c)