From b066b6df138e88e75cb40f1ec3e58fbd13e61909 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 12 Sep 2017 09:19:52 -0500 Subject: Remove global app references (#7433) * remove global app references * test fix * fix api4 test compilation --- cmd/platform/version.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cmd/platform/version.go') diff --git a/cmd/platform/version.go b/cmd/platform/version.go index d9df65965..c34254c45 100644 --- a/cmd/platform/version.go +++ b/cmd/platform/version.go @@ -16,20 +16,21 @@ var versionCmd = &cobra.Command{ } func versionCmdF(cmd *cobra.Command, args []string) error { - if err := initDBCommandContextCobra(cmd); err != nil { + a, err := initDBCommandContextCobra(cmd) + if err != nil { return err } - printVersion() + printVersion(a) return nil } -func printVersion() { +func printVersion(a *app.App) { CommandPrintln("Version: " + model.CurrentVersion) CommandPrintln("Build Number: " + model.BuildNumber) CommandPrintln("Build Date: " + model.BuildDate) CommandPrintln("Build Hash: " + model.BuildHash) CommandPrintln("Build Enterprise Ready: " + model.BuildEnterpriseReady) - CommandPrintln("DB Version: " + app.Global().Srv.Store.(*store.LayeredStore).DatabaseLayer.GetCurrentSchemaVersion()) + CommandPrintln("DB Version: " + a.Srv.Store.(*store.LayeredStore).DatabaseLayer.GetCurrentSchemaVersion()) } -- cgit v1.2.3-1-g7c22