flag를 flagx로 변경
This commit is contained in:
7
main.go
7
main.go
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user