forked from security/hakurei
container/check: move absolute pathname
This allows use of absolute pathname values without importing container. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -6,11 +6,11 @@ var (
|
||||
version = compPoison
|
||||
)
|
||||
|
||||
// check validates string value set at compile time.
|
||||
func check(s string) (string, bool) { return s, s != compPoison && s != "" }
|
||||
// checkComp validates string value set at compile time.
|
||||
func checkComp(s string) (string, bool) { return s, s != compPoison && s != "" }
|
||||
|
||||
func Version() string {
|
||||
if v, ok := check(version); ok {
|
||||
if v, ok := checkComp(version); ok {
|
||||
return v
|
||||
}
|
||||
return "impure"
|
||||
|
||||
Reference in New Issue
Block a user