Skip to content

Commit

Permalink
trim newline
Browse files Browse the repository at this point in the history
  • Loading branch information
dwertent committed Dec 28, 2023
1 parent 4d59ffa commit 741ad2d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/utils/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package utils
import (
"fmt"
"os"
"strings"
)

const (
Expand All @@ -29,10 +30,10 @@ func LoadCredentialsFromFile(secretPath string) (*Credentials, error) {

t := &Credentials{}
if accessKey, err := os.ReadFile(accessKeyPath); err == nil {
t.AccessKey = string(accessKey)
t.AccessKey = strings.TrimSuffix(string(accessKey), "\n")
}
if account, err := os.ReadFile(accountPath); err == nil {
t.Account = string(account)
t.Account = strings.TrimSuffix(string(account), "\n")
}

return t, nil
Expand Down

0 comments on commit 741ad2d

Please sign in to comment.