remove errors dependency
This commit is contained in:
parent
15db885db8
commit
4b6d8e6c6b
2 changed files with 3 additions and 3 deletions
1
go.mod
1
go.mod
|
@ -7,5 +7,4 @@ require (
|
|||
github.com/google/uuid v1.2.0
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/influxdata/influxdb-client-go/v2 v2.2.2
|
||||
github.com/pkg/errors v0.9.1
|
||||
)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package storage
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type inmemorySensorRegistry struct {
|
||||
|
@ -16,7 +17,7 @@ func NewInmemorySensorRegistry() *inmemorySensorRegistry {
|
|||
|
||||
func (registry *inmemorySensorRegistry) RegisterSensorByName(name string) (*WeatherSensor, error) {
|
||||
if registry.ExistSensorName(name) {
|
||||
return nil, errors.Errorf("Sensorname already exists")
|
||||
return nil, errors.New("Sensorname already exists")
|
||||
}
|
||||
sensor := new(WeatherSensor)
|
||||
sensor.Name = name
|
||||
|
|
Loading…
Add table
Reference in a new issue