diff options
Diffstat (limited to 'internal/comp.go')
| -rw-r--r-- | internal/comp.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/internal/comp.go b/internal/comp.go index e7064db0..89dc0f85 100644 --- a/internal/comp.go +++ b/internal/comp.go @@ -3,10 +3,15 @@ package internal const compPoison = "INVALIDINVALIDINVALIDINVALIDINVALID" var ( - Version = compPoison + version = compPoison ) -// Check validates string value set at compile time. -func Check(s string) (string, bool) { - return s, s != compPoison && s != "" +// check validates string value set at compile time. +func check(s string) (string, bool) { return s, s != compPoison && s != "" } + +func Version() string { + if v, ok := check(version); ok { + return v + } + return "impure" } |
