Code review comments
parent
09cdf602b8
commit
750cf39f1e
|
@ -27,7 +27,7 @@ import (
|
|||
"k8s.io/minikube/pkg/minikube/style"
|
||||
)
|
||||
|
||||
// Message outputs a templated fatal error message and exits with the supplied error code.
|
||||
// Message outputs a templated message and exits without interpretation
|
||||
func Message(r reason.Kind, format string, args ...out.V) {
|
||||
if r.ID == "" {
|
||||
glog.Errorf("supplied reason has no ID: %+v", r)
|
||||
|
@ -63,7 +63,7 @@ func Advice(r reason.Kind, msg string, advice string, a ...out.V) {
|
|||
Message(r, msg, a...)
|
||||
}
|
||||
|
||||
// Error outputs an error and exits.
|
||||
// Error takes a fatal error, matches it against known issues, and outputs the best message for it
|
||||
func Error(r reason.Kind, msg string, err error) {
|
||||
ki := reason.MatchKnownIssue(r, err, runtime.GOOS)
|
||||
if ki != nil {
|
||||
|
|
|
@ -50,7 +50,7 @@ func knownIssues() []match {
|
|||
return ps
|
||||
}
|
||||
|
||||
// FindMatch returns a known issue from an error on an OS
|
||||
// MatchKnownIssue returns a known issue from an error on an OS
|
||||
func MatchKnownIssue(r Kind, err error, goos string) *Kind {
|
||||
// The kind passed in has specified that it should not be rematched
|
||||
if r.NoMatch {
|
||||
|
|
|
@ -74,8 +74,8 @@ type StatusChecker func() State
|
|||
type State struct {
|
||||
Installed bool
|
||||
Healthy bool
|
||||
Running bool // the provider does not appear to be running
|
||||
NeedsImprovement bool // driver is healthy but could be improved
|
||||
Running bool // it at least appears to be running
|
||||
NeedsImprovement bool // healthy but could be improved
|
||||
Error error
|
||||
Fix string
|
||||
Doc string
|
||||
|
|
Loading…
Reference in New Issue