From 992d4b92bb4f4578eeab451e9aeb722b5d393cf3 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 21 Oct 2020 18:13:34 +0530 Subject: [PATCH] util: NewCredentials() dont have any callers We have below exported function in credentials.go which is not called from anywhere in the repo. Removing it for the same reason. ``` // NewCredentials generates new credentials when id and key // are provided. func NewCredentials(id, key string) (*Credentials, error) { ... ``` Signed-off-by: Humble Chirammal --- internal/util/credentials.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/internal/util/credentials.go b/internal/util/credentials.go index 2b68fadb0..5170748f8 100644 --- a/internal/util/credentials.go +++ b/internal/util/credentials.go @@ -110,19 +110,6 @@ func NewAdminCredentials(secrets map[string]string) (*Credentials, error) { return newCredentialsFromSecret(credAdminID, credAdminKey, secrets) } -// NewCredentials generates new credentials when id and key are provided. -func NewCredentials(id, key string) (*Credentials, error) { - var c = &Credentials{} - - c.ID = id - keyFile, err := storeKey(key) - if err == nil { - c.KeyFile = keyFile - } - - return c, err -} - // GetMonValFromSecret returns monitors from secret. func GetMonValFromSecret(secrets map[string]string) (string, error) { if mons, ok := secrets[credMonitors]; ok {