feat(remote): 显示控制中心和实例版本

This commit is contained in:
yml
2026-11-22 15:26:41 +08:00
parent 0940dd8f85
commit 9ed41d6551
6 changed files with 86 additions and 6 deletions
+4
View File
@@ -10,6 +10,7 @@ import (
"syscall"
"time"
"douyu_go/internal/constants"
"douyu_go/internal/remote"
)
@@ -37,12 +38,15 @@ func main() {
OperatorToken: *operatorToken,
EnrollToken: *enrollToken,
EnrollWindow: *enrollWindow,
Version: constants.Version,
BuildTime: constants.BuildTime,
})
if err != nil {
log.Fatal(err)
}
defer server.Close()
fmt.Printf("控制中心版本: %s (构建 %s)\n", constants.Version, constants.BuildTime)
fmt.Printf("远端控制台: http://%s/#admin=%s\n", displayAddr(*addr), *operatorToken)
if strings.TrimSpace(*enrollToken) != "" {
fmt.Printf("实例注册需要注册令牌: %s\n", *enrollToken)