Skip to content

Commit

Permalink
Statisfy staticcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
SaaldjorMike committed May 24, 2024
1 parent b389708 commit 1963d18
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/internal/humiographql/s3-configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type S3Configuration struct {
// IsEnabled - determine if S3Configuration is enabled based on values and the Disabled field
// to avoid a bool defaulting to false
func (s *S3Configuration) IsEnabled() bool {
if s.IsConfigured() == false {
if !s.IsConfigured() {
return false
}
return !s.Disabled
Expand Down
4 changes: 2 additions & 2 deletions api/repositories.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (r *Repositories) EnableS3Archiving(name string) error {
return err
}

if existingRepo.S3ArchivingConfiguration.IsConfigured() == false {
if !existingRepo.S3ArchivingConfiguration.IsConfigured() {
return fmt.Errorf("repository has no configuration for S3 archiving")
}

Expand All @@ -276,7 +276,7 @@ func (r *Repositories) DisableS3Archiving(name string) error {
return err
}

if existingRepo.S3ArchivingConfiguration.IsConfigured() == false {
if !existingRepo.S3ArchivingConfiguration.IsConfigured() {
return fmt.Errorf("repository has no configuration for S3 archiving")
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/humioctl/repos_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func newReposUpdateCmd() *cobra.Command {
client := NewApiClient(cmd)

if descriptionFlag.value == nil && retentionTimeFlag.value == nil && ingestSizeBasedRetentionFlag.value == nil && storageSizeBasedRetentionFlag.value == nil &&
enableS3ArchivingFlag == false && disableS3ArchivingFlag == false && s3ArchivingBucketFlag.value == nil && s3ArchivingRegionFlag.value == nil && s3ArchivingFormatFlag.value == nil {
!enableS3ArchivingFlag && !disableS3ArchivingFlag && s3ArchivingBucketFlag.value == nil && s3ArchivingRegionFlag.value == nil && s3ArchivingFormatFlag.value == nil {
exitOnError(cmd, fmt.Errorf("you must specify at least one flag to update"), "Nothing specified to update")
}
if descriptionFlag.value != nil {
Expand All @@ -59,12 +59,12 @@ func newReposUpdateCmd() *cobra.Command {
exitOnError(cmd, err, "Error updating S3 archiving configuration")
}

if disableS3ArchivingFlag == true {
if disableS3ArchivingFlag {
err := client.Repositories().DisableS3Archiving(repoName)
exitOnError(cmd, err, "Error disabling S3 archiving")
}

if enableS3ArchivingFlag == true {
if enableS3ArchivingFlag {
err := client.Repositories().EnableS3Archiving(repoName)
exitOnError(cmd, err, "Error enabling S3 archiving")
}
Expand Down

0 comments on commit 1963d18

Please sign in to comment.