all: Clean up fmt.Errorf usage (#8309)
This commit is contained in:
@@ -45,7 +45,7 @@ func DeviceIDFromString(s string) (DeviceID, error) {
|
||||
func DeviceIDFromBytes(bs []byte) (DeviceID, error) {
|
||||
var n DeviceID
|
||||
if len(bs) != len(n) {
|
||||
return n, fmt.Errorf("incorrect length of byte slice representing device ID")
|
||||
return n, errors.New("incorrect length of byte slice representing device ID")
|
||||
}
|
||||
copy(n[:], bs)
|
||||
return n, nil
|
||||
@@ -129,7 +129,7 @@ func (n *DeviceID) UnmarshalText(bs []byte) error {
|
||||
}
|
||||
}
|
||||
|
||||
func (n *DeviceID) ProtoSize() int {
|
||||
func (*DeviceID) ProtoSize() int {
|
||||
// Used by protobuf marshaller.
|
||||
return DeviceIDLength
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user