Remove unwanted string converstion in metrics errors

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2019-07-19 11:29:47 +05:30
parent c45b77541b
commit 3ccaeef758

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.