Skip to content

Commit

Permalink
Return env from SetEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg committed May 26, 2023
1 parent 4b54e20 commit 02986f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion appx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand All @@ -53,6 +53,7 @@ func SetEnv(env, def string) {
}
appEnv = v
})
return appEnv
}

// OnSignal run fn.
Expand Down

0 comments on commit 02986f3

Please sign in to comment.