Standardize error messages by removing config prefix
This commit is contained in:
parent
3de1f3d072
commit
1e03a51eae
15 changed files with 23 additions and 31 deletions
|
|
@ -55,7 +55,7 @@ func NewConnection(uri, device, comset string, baudrate int, rtu bool) (conn met
|
|||
}
|
||||
|
||||
if conn == nil {
|
||||
return nil, errors.New("config: invalid modbus configuration: need either uri or device")
|
||||
return nil, errors.New("invalid modbus configuration: need either uri or device")
|
||||
}
|
||||
|
||||
return conn, nil
|
||||
|
|
@ -70,7 +70,7 @@ func NewDevice(model string, isRS485 bool) (device meters.Device, err error) {
|
|||
}
|
||||
|
||||
if device == nil {
|
||||
err = errors.New("config: invalid modbus configuration: need either uri or device")
|
||||
err = errors.New("invalid modbus configuration: need either uri or device")
|
||||
}
|
||||
|
||||
return device, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue