From 4b6d8e6c6b7570c3d8dcc7da765b610f52a528fc Mon Sep 17 00:00:00 2001 From: Joel Schmid Date: Sat, 20 Mar 2021 16:14:10 +0100 Subject: [PATCH] remove errors dependency --- go.mod | 1 - storage/inmemory-storage.go | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 24e201d..307ce95 100644 --- a/go.mod +++ b/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 ) diff --git a/storage/inmemory-storage.go b/storage/inmemory-storage.go index a297087..9e00e14 100644 --- a/storage/inmemory-storage.go +++ b/storage/inmemory-storage.go @@ -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