forked from TrueCloudLab/frostfs-s3-gw
[#578] Unify version output
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
aad4862c59
commit
f5441eb6cb
2 changed files with 7 additions and 2 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
@ -109,12 +110,15 @@ func prepare() (context.Context, *zap.Logger) {
|
|||
|
||||
func main() {
|
||||
app := &cli.App{
|
||||
Name: "NeoFS gate authentication manager",
|
||||
Name: "NeoFS S3 Authmate",
|
||||
Usage: "Helps manage delegated access via gates to data stored in NeoFS network",
|
||||
Version: version.Version,
|
||||
Flags: appFlags(),
|
||||
Commands: appCommands(),
|
||||
}
|
||||
cli.VersionPrinter = func(c *cli.Context) {
|
||||
fmt.Printf("%s\nVersion: %s\nGoVersion: %s\n", c.App.Name, c.App.Version, runtime.Version())
|
||||
}
|
||||
|
||||
viper.AutomaticEnv()
|
||||
viper.SetEnvPrefix("AUTHMATE")
|
||||
|
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
@ -259,7 +260,7 @@ func newSettings() *viper.Viper {
|
|||
|
||||
os.Exit(0)
|
||||
case versionFlag != nil && *versionFlag:
|
||||
fmt.Printf("NeoFS S3 gateway %s\n", version.Version)
|
||||
fmt.Printf("NeoFS S3 Gateway\nVersion: %s\nGoVersion: %s\n", version.Version, runtime.Version())
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue