Print custom host with version

This commit is contained in:
Neeraj Gupta
2024-09-18 16:07:05 +05:30
parent cda7dda3cb
commit 5cc4a5ed07

View File

@@ -79,6 +79,9 @@ func main() {
// If no arguments are passed, show help
os.Args = append(os.Args, "help")
}
if os.Args[1] == "version" && viper.GetString("endpoint.api") != constants.EnteApiUrl {
log.Printf("Custom endpoint: %s\n", viper.GetString("endpoint.api"))
}
cmd.Execute(&ctrl, AppVersion)
}