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 <hchiramm@redhat.com>
This commit is contained in:
Humble Chirammal 2020-10-21 18:13:34 +05:30 committed by mergify[bot]
parent b4452f0787
commit 992d4b92bb

View File

@ -110,19 +110,6 @@ func NewAdminCredentials(secrets map[string]string) (*Credentials, error) {
return newCredentialsFromSecret(credAdminID, credAdminKey, secrets) 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. // GetMonValFromSecret returns monitors from secret.
func GetMonValFromSecret(secrets map[string]string) (string, error) { func GetMonValFromSecret(secrets map[string]string) (string, error) {
if mons, ok := secrets[credMonitors]; ok { if mons, ok := secrets[credMonitors]; ok {