mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
refactor: minor changes to error messages
This commit is contained in:
parent
34af75c1d2
commit
7cd927d503
1 changed files with 2 additions and 2 deletions
|
|
@ -118,7 +118,7 @@ func (l *LocalSecretStore) RemoveSecretByID(secretID string) error {
|
||||||
// variable MASTER_KEY. If not found, it prints an error.
|
// variable MASTER_KEY. If not found, it prints an error.
|
||||||
func OpenStore(filename string) (SecretStore, error) {
|
func OpenStore(filename string) (SecretStore, error) {
|
||||||
if filename == "" {
|
if filename == "" {
|
||||||
return nil, fmt.Errorf("no path to secret store provided")
|
return nil, fmt.Errorf("path to secret store required")
|
||||||
}
|
}
|
||||||
|
|
||||||
masterKey := os.Getenv("MASTER_KEY")
|
masterKey := os.Getenv("MASTER_KEY")
|
||||||
|
|
@ -128,7 +128,7 @@ func OpenStore(filename string) (SecretStore, error) {
|
||||||
|
|
||||||
store, err := NewLocalSecretStore(masterKey, filename, true)
|
store, err := NewLocalSecretStore(masterKey, filename, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("cannot open secrets store: %v", err)
|
return nil, fmt.Errorf("failed to create new local secret store: %v", err)
|
||||||
}
|
}
|
||||||
return store, nil
|
return store, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue