From 02986f3c0f17f3e93151b3c45930509963bfeac7 Mon Sep 17 00:00:00 2001 From: Oleg Kovalov Date: Fri, 26 May 2023 15:03:42 +0200 Subject: [PATCH] Return env from SetEnv --- appx.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/appx.go b/appx.go index 0c37bf8..ba05028 100644 --- a/appx.go +++ b/appx.go @@ -41,7 +41,7 @@ func Env() string { return appEnv } // appx.SetEnv("", "dev") // set "dev" directly // // This function should be called at the start of the application. -func SetEnv(env, def string) { +func SetEnv(env, def string) string { if appEnv != "" { panic("appx: SetEnv called twice") } @@ -53,6 +53,7 @@ func SetEnv(env, def string) { } appEnv = v }) + return appEnv } // OnSignal run fn.