From 1dd8880551cd00865d0a178650762102006f9e42 Mon Sep 17 00:00:00 2001 From: dusanb94 Date: Tue, 14 Jul 2020 18:54:10 +0200 Subject: [PATCH] Fix errors message Signed-off-by: dusanb94 --- things/redis/channels.go | 14 ++++++++------ things/redis/things.go | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/things/redis/channels.go b/things/redis/channels.go index 121bddc652..7bfb3a86ae 100644 --- a/things/redis/channels.go +++ b/things/redis/channels.go @@ -14,14 +14,16 @@ import ( const chanPrefix = "channel" -// ErrRedisConnectChannel indicates error while adding connection in redis cache -var ErrRedisConnectChannel = errors.New("add connection to redis cache error") +var ( + // ErrRedisConnectChannel indicates error while adding connection in redis cache + ErrRedisConnectChannel = errors.New("failed to add connection to redis cache") -// ErrRedisDisconnectChannel indicates error while removing connection from redis cache -var ErrRedisDisconnectChannel = errors.New("remove connection from redis cache error") + // ErrRedisDisconnectChannel indicates error while removing connection from redis cache + ErrRedisDisconnectChannel = errors.New("failed to remove connection from redis cache") -// ErrRedisRemoveChannel indicates error while removing channel from redis cache -var ErrRedisRemoveChannel = errors.New("remove channel from redis cache error") + // ErrRedisRemoveChannel indicates error while removing channel from redis cache + ErrRedisRemoveChannel = errors.New("failed to remove channel from redis cache") +) var _ things.ChannelCache = (*channelCache)(nil) diff --git a/things/redis/things.go b/things/redis/things.go index 0b38996b52..565e95e8b7 100644 --- a/things/redis/things.go +++ b/things/redis/things.go @@ -19,13 +19,13 @@ const ( var ( // ErrRedisThingSave indicates error while saving Thing in redis cache - ErrRedisThingSave = errors.New("saving thing in redis cache error") + ErrRedisThingSave = errors.New("failed to save thing in redis cache") // ErrRedisThingID indicates error while geting Thing ID from redis cache - ErrRedisThingID = errors.New("get thing id from redis cache error") + ErrRedisThingID = errors.New("failed to get thing id from redis cache") // ErrRedisThingRemove indicates error while removing Thing from redis cache - ErrRedisThingRemove = errors.New("remove thing from redis cache error") + ErrRedisThingRemove = errors.New("failed to remove thing from redis cache") ) var _ things.ThingCache = (*thingCache)(nil)