Merge pull request #80347 from humblec/metrics

Remove unwanted string converstion in metrics errors
This commit is contained in:
Kubernetes Prow Robot 2019-07-25 07:35:55 -07:00 committed by GitHub
commit 7aa5f9727b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ func NewNoPathDefinedError() *MetricsError {
func NewFsInfoFailedError(err error) *MetricsError {
return &MetricsError{
Code: ErrCodeFsInfoFailed,
Msg: fmt.Sprintf("Failed to get FsInfo due to error %v", err),
Msg: fmt.Sprintf("failed to get FsInfo due to error %v", err),
}
}
@ -58,7 +58,7 @@ type MetricsError struct {
}
func (e *MetricsError) Error() string {
return fmt.Sprintf("%s", e.Msg)
return e.Msg
}
// IsNotSupported returns true if and only if err is "key" not found error.