github.com/hanks177/podman/v4@v4.1.3-0.20220613032544-16d90015bc83/libpod/common/common.go (about)

     1  package common
     2  
     3  // IsTrue determines whether the given string equals "true".
     4  func IsTrue(str string) bool {
     5  	return str == "true"
     6  }
     7  
     8  // IsFalse determines whether the given string equals "false".
     9  func IsFalse(str string) bool {
    10  	return str == "false"
    11  }
    12  
    13  // IsValidBool determines whether the given string equals "true" or "false".
    14  func IsValidBool(str string) bool {
    15  	return IsTrue(str) || IsFalse(str)
    16  }