mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #80347 from humblec/metrics
Remove unwanted string converstion in metrics errors
This commit is contained in:
commit
7aa5f9727b
@ -47,7 +47,7 @@ func NewNoPathDefinedError() *MetricsError {
|
|||||||
func NewFsInfoFailedError(err error) *MetricsError {
|
func NewFsInfoFailedError(err error) *MetricsError {
|
||||||
return &MetricsError{
|
return &MetricsError{
|
||||||
Code: ErrCodeFsInfoFailed,
|
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 {
|
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.
|
// IsNotSupported returns true if and only if err is "key" not found error.
|
||||||
|
Loading…
Reference in New Issue
Block a user