Skip to content

Commit

Permalink
api: address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Nov 13, 2023
1 parent eaaea00 commit 276e0fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ func (rs RedundancySettings) Validate() error {
return nil
}

// Validate returns an error if the redundancy settings are not considered
// Validate returns an error if the authentication settings are not considered
// valid.
func (s3as S3AuthenticationSettings) Validate() error {
for id, key := range s3as.V4Keypairs {
if len(id) == 0 {
return fmt.Errorf("AccessKeyID cannot be empty")
} else if len(key) < S3MinAccessKeyLen || len(key) > S3MaxAccessKeyLen {
return fmt.Errorf("AccessKeyID must be between %d and %d characters long", S3MinAccessKeyLen, S3MaxAccessKeyLen)
return fmt.Errorf("AccessKeyID must be between %d and %d characters long but was %d", S3MinAccessKeyLen, S3MaxAccessKeyLen, len(key))
}
}
return nil
Expand Down

0 comments on commit 276e0fb

Please sign in to comment.