Skip to content

Commit

Permalink
chore(deps): go mod: update
Browse files Browse the repository at this point in the history
  • Loading branch information
grokify committed Dec 25, 2024
1 parent 1886cb7 commit 45dc5f2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions credentials_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ type CredentialsSet struct {

func ReadFileCredentialsSet(credentialsSetFilename string, inflateEndpoints bool) (*CredentialsSet, error) {
var set *CredentialsSet
_, err := jsonutil.UnmarshalFile(credentialsSetFilename, &set)
if err != nil {
if err := jsonutil.UnmarshalFile(credentialsSetFilename, &set); err != nil {
return nil, err
}
if inflateEndpoints {
} else if inflateEndpoints {
err := set.Inflate()
if err != nil {
return nil, err
Expand Down Expand Up @@ -106,5 +104,5 @@ func (set *CredentialsSet) Keys() []string {
}

func (set *CredentialsSet) WriteFile(filename, prefix, indent string, perm fs.FileMode) error {
return jsonutil.WriteFile(filename, set, prefix, indent, perm)
return jsonutil.MarshalFile(filename, set, prefix, indent, perm)
}

0 comments on commit 45dc5f2

Please sign in to comment.