From 8a081c6580807ee7c84c458f3279e63e707a09e1 Mon Sep 17 00:00:00 2001 From: kukugi Date: Tue, 18 May 2021 16:17:27 +0900 Subject: [PATCH] chore: Add a env prefix --- server/cmd/execute.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/cmd/execute.go b/server/cmd/execute.go index dd0c3173cb..b420636785 100644 --- a/server/cmd/execute.go +++ b/server/cmd/execute.go @@ -13,6 +13,10 @@ import ( "github.com/line/lbm-sdk/v2/server" ) +const ( + envPrefix = "LBM" +) + // Execute executes the root command of an application. It handles creating a // server context object with the appropriate server and client objects injected // into the underlying stdlib Context. It also handles adding core CLI flags, @@ -32,6 +36,6 @@ func Execute(rootCmd *cobra.Command, defaultHome string) error { rootCmd.PersistentFlags().String(flags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)") rootCmd.PersistentFlags().String(flags.FlagLogFormat, ostcfg.LogFormatPlain, "The logging format (json|plain)") - executor := ostcli.PrepareBaseCmd(rootCmd, "", defaultHome) + executor := ostcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome) return executor.ExecuteContext(ctx) }