[#578] Unify version output

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-07-13 15:27:05 +03:00 committed by Alex Vanin
parent aad4862c59
commit f5441eb6cb
2 changed files with 7 additions and 2 deletions

View file

@ -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")