(val string)
| 192 | } |
| 193 | |
| 194 | func ParseBool(val string) (bool, error) { |
| 195 | switch strings.ToLower(strings.TrimSpace(val)) { |
| 196 | case "1", "true", "yes", "on": |
| 197 | return true, nil |
| 198 | case "0", "false", "no", "off": |
| 199 | return false, nil |
| 200 | } |
| 201 | return false, fmt.Errorf(i18n.T("plugin_invalid_bool"), val) |
| 202 | } |
| 203 | |
| 204 | type SetupQuestion struct { |
| 205 | *Setting |
no test coverage detected