blob: 93a736af2512853c30296796a8d1d19538d324b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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)
}
|