From 4016da4482ec54a791d2ceb161fdd4257c0b312f Mon Sep 17 00:00:00 2001 From: Andre Sterba <andre.sterba@stud.h-da.de> Date: Thu, 14 Apr 2022 14:50:27 +0000 Subject: [PATCH] Fix lint errors See merge request danet/gosdn!285 --- controller/nucleus/databaseDeviceStore.go | 2 +- controller/nucleus/device.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controller/nucleus/databaseDeviceStore.go b/controller/nucleus/databaseDeviceStore.go index 0d108f295..cb6af812e 100644 --- a/controller/nucleus/databaseDeviceStore.go +++ b/controller/nucleus/databaseDeviceStore.go @@ -45,7 +45,7 @@ func (s *DatabaseDeviceStore) Get(query store.Query) (device.Device, error) { collection := db.Collection(s.storeName) result := collection.FindOne(ctx, bson.D{primitive.E{Key: "_id", Value: query.ID}}) if result == nil { - return nil, errors.ErrCouldNotFind{StoreName: pndStoreName} + return nil, errors.ErrCouldNotFind{StoreName: deviceStoreName} } err := result.Decode(&loadedDevice) diff --git a/controller/nucleus/device.go b/controller/nucleus/device.go index 100666727..df0c67c58 100644 --- a/controller/nucleus/device.go +++ b/controller/nucleus/device.go @@ -33,9 +33,9 @@ func NewDevice(name string, uuidInput uuid.UUID, opt *tpb.TransportOption, sbi s name = namesgenerator.GetRandomName(0) } - // We want a representation of the OND's config (the SBI-schema's root created through ygot), - // but do not want to work on the sbi.Schema() directly. - // So the root of sbi.Schema() is never changed when a set or get on a device will be called. + // We want a representation of the OND's config (the SBI-schema's root created through ygot), + // but do not want to work on the sbi.Schema() directly. + // So the root of sbi.Schema() is never changed when a set or get on a device will be called. root, err := ygot.DeepCopy(sbi.Schema().Root) if err != nil { return nil, err -- GitLab