diff options
| author | Jeff Carr <[email protected]> | 2025-10-26 22:41:47 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-26 22:41:47 -0500 |
| commit | 4d0828def125f96d376cc1bd018bd3d8b0997901 (patch) | |
| tree | b683bbe08350c6e5b78eba65be9a6496091c874b /true.go | |
| parent | 59c9500872620a0e43752d7ebf352804aaf49925 (diff) | |
rearranging filenames
Diffstat (limited to 'true.go')
| -rw-r--r-- | true.go | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -0,0 +1,21 @@ +package env + +import ( + "strings" +) + +func True(flag string) bool { + saveMu.Lock() + defer saveMu.Unlock() + if envPB == nil { + return false + } + found := envPB.FindByVar(flag) + if found == nil { + return false + } + if strings.ToLower(found.Value) == "true" { + return true + } + return false +} |
