Update pkg/doctor/doctor.go
Co-authored-by: John Gibb <johngibb@gmail.com>
This commit is contained in:
parent
63226be170
commit
03aeef58de
1 changed files with 6 additions and 12 deletions
|
|
@ -22,25 +22,19 @@ type Check struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status represents the status of a check
|
// Status represents the status of a check
|
||||||
type Status int
|
type Status string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
StatusOK Status = iota
|
StatusOK Status = "✅"
|
||||||
StatusWarning
|
StatusWarning Status = "⚠️"
|
||||||
StatusError
|
StatusError Status = "❌"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s Status) String() string {
|
func (s Status) String() string {
|
||||||
switch s {
|
if s == "" {
|
||||||
case StatusOK:
|
|
||||||
return "✅"
|
|
||||||
case StatusWarning:
|
|
||||||
return "⚠️"
|
|
||||||
case StatusError:
|
|
||||||
return "❌"
|
|
||||||
default:
|
|
||||||
return "❓"
|
return "❓"
|
||||||
}
|
}
|
||||||
|
return string(s)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Doctor runs all diagnostic checks
|
// Doctor runs all diagnostic checks
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue