Files
podman/libpod/common/common.go
Daniel J Walsh c37589f503 Set blob cache directory based on GraphDriver
Currently in rootless containers, we end up not using the blob cache.
We also don't store the blob cache based on the users specified graph
storage.  This change will cause the cache directory to be stored with
the rest of the containe images.

While doing this patch, I found that we had duplicated GetSystemContext in
two places in libpod. I cleaned this up.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-29 08:27:33 -04:00

17 lines
402 B
Go

package common
// IsTrue determines whether the given string equals "true"
func IsTrue(str string) bool {
return str == "true"
}
// IsFalse determines whether the given string equals "false"
func IsFalse(str string) bool {
return str == "false"
}
// IsValidBool determines whether the given string equals "true" or "false"
func IsValidBool(str string) bool {
return IsTrue(str) || IsFalse(str)
}