mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-29 05:56:38 +08:00
[优化] 修复 --version 错误
This commit is contained in:
@@ -2,6 +2,7 @@ package common
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -19,10 +20,10 @@ var (
|
||||
var UploadPath = "upload"
|
||||
|
||||
func printHelp() {
|
||||
slog.Info("OpenFlare " + Version + " - Internal OpenResty Control Plane.")
|
||||
slog.Info("Copyright (C) 2023 JustSong. All rights reserved.")
|
||||
slog.Info("GitHub: https://github.com/Rain-kl/OpenFlare")
|
||||
slog.Info("Usage: openflare [--port <port>] [--log-dir <log directory>] [--version] [--help]")
|
||||
fmt.Println("OpenFlare " + Version + " - Internal OpenResty Control Plane.")
|
||||
fmt.Println("Copyright (C) 2023 JustSong. All rights reserved.")
|
||||
fmt.Println("GitHub: https://github.com/Rain-kl/OpenFlare")
|
||||
fmt.Println("Usage: openflare [--port <port>] [--log-dir <log directory>] [--version] [--help]")
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -32,7 +33,7 @@ func init() {
|
||||
}
|
||||
|
||||
if *PrintVersion {
|
||||
slog.Info(Version)
|
||||
fmt.Println(Version)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user