From 21814dbaeb02910eba29761c54320ecec6cb91a8 Mon Sep 17 00:00:00 2001
From: Olgun Cengiz <olgun.cengiz@vereign.com>
Date: Tue, 8 Oct 2019 13:27:46 +0300
Subject: [PATCH] gopkg updated and removed log lines

---
 Gopkg.toml                   | 4 ----
 handler/manage_device_key.go | 6 ------
 utils/utils.go               | 7 +------
 3 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/Gopkg.toml b/Gopkg.toml
index 84a0c61..118756e 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -6,10 +6,6 @@
   name = "github.com/hashicorp/go-retryablehttp"
   version = "=v0.5.4"
 
-[[constraint]]
-  name = "github.com/golang/protobuf"
-  version = "1.1.0"
-
 [[constraint]]
   branch = "master"
   name = "golang.org/x/net"
diff --git a/handler/manage_device_key.go b/handler/manage_device_key.go
index be05c4c..9bae5c3 100644
--- a/handler/manage_device_key.go
+++ b/handler/manage_device_key.go
@@ -23,7 +23,6 @@ import (
 	"code.vereign.com/code/viam-apis/key-storage-agent/api"
 	"code.vereign.com/code/viam-apis/utils"
 	"golang.org/x/net/context"
-	"log"
 )
 
 func (s *KeyStorageServerImpl) SetAuthorized(ctx context.Context, in *api.SetAuthorizedRequest) (*api.SetAuthorizedResponse, error) {
@@ -110,18 +109,13 @@ func (s *KeyStorageServerImpl) updateAll(ctx context.Context, uuid string, updat
 
 func updateKey(client *client.DataStorageClientImpl, uuid string, keyType api.KeyType, update func(*api.Key)) []*api.Status {
 	key, statusList := keyutils.GetKey(client, uuid, keyType)
-	log.Printf("OC-16 key: %v", key)
-	log.Printf("OC-16 statusList: %v", statusList)
 	if statusList != nil {
 		return statusList
 	}
 
 	update(key)
-	log.Printf("OC-16 key: %v", key)
 
 	_, errors, err := client.PutData("keys", uuid+"/"+api.KeyType.String(keyType), key)
-	log.Printf("OC-16 errors: %v", errors)
-	log.Printf("OC-16 err: %v", err)
 	statusList = keyutils.HandlePutDataErrors(statusList, errors, err)
 	if statusList != nil && len(statusList) > 0 {
 		return statusList
diff --git a/utils/utils.go b/utils/utils.go
index 86b6f67..a8158a3 100644
--- a/utils/utils.go
+++ b/utils/utils.go
@@ -138,12 +138,7 @@ func GetKey(client *client.DataStorageClientImpl, uuid string, keyType api.KeyTy
 
 	key := &api.Key{}
 
-	log.Printf("OC-16 uuid/api.KeyType.String(keyType): %v", uuid+"/"+api.KeyType.String(keyType))
-	hasData, errorsString, err := client.GetData("keys", uuid+"/"+api.KeyType.String(keyType), key)
-	log.Printf("OC-16 key: %v", key)
-	log.Printf("OC-16 hasData: %v", hasData)
-	log.Printf("OC-16 errorsString: %v", errorsString)
-	log.Printf("OC-16 err: %v", err)
+	_, errorsString, err := client.GetData("keys", uuid+"/"+api.KeyType.String(keyType), key)
 	if err != nil {
 		statusList = utils.AddStatus(statusList, "400", api.StatusType_ERROR, errorsString)
 		return nil, statusList
-- 
GitLab