flag를 flagx로 변경

This commit is contained in:
2023-06-21 14:38:26 +09:00
parent ed905a3722
commit 667126c5bc
5 changed files with 12 additions and 20 deletions

View File

@ -5,6 +5,7 @@ import (
"context"
"net/http"
"repositories.action2quare.com/ayo/gocommon/flagx"
"repositories.action2quare.com/ayo/gocommon/wshandler"
"repositories.action2quare.com/ayo/tavern/core"
@ -12,6 +13,8 @@ import (
"repositories.action2quare.com/ayo/gocommon/logger"
)
var prefix = flagx.String("prefix", "", "")
func main() {
ctx, cancel := context.WithCancel(context.Background())
var config core.TavernConfig
@ -29,8 +32,8 @@ func main() {
panic(err)
} else {
serveMux := http.NewServeMux()
wsh.RegisterHandlers(ctx, serveMux, *common.PrefixPtr)
tv.RegisterHandlers(ctx, serveMux, *common.PrefixPtr)
wsh.RegisterHandlers(ctx, serveMux, *prefix)
tv.RegisterHandlers(ctx, serveMux, *prefix)
server := common.NewHTTPServer(serveMux)
logger.Println("tavern is started")
server.Start()