Skip to content

Commit 1963d18

Browse files
committed
Statisfy staticcheck
1 parent b389708 commit 1963d18

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

api/internal/humiographql/s3-configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type S3Configuration struct {
1515
// IsEnabled - determine if S3Configuration is enabled based on values and the Disabled field
1616
// to avoid a bool defaulting to false
1717
func (s *S3Configuration) IsEnabled() bool {
18-
if s.IsConfigured() == false {
18+
if !s.IsConfigured() {
1919
return false
2020
}
2121
return !s.Disabled

api/repositories.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func (r *Repositories) EnableS3Archiving(name string) error {
252252
return err
253253
}
254254

255-
if existingRepo.S3ArchivingConfiguration.IsConfigured() == false {
255+
if !existingRepo.S3ArchivingConfiguration.IsConfigured() {
256256
return fmt.Errorf("repository has no configuration for S3 archiving")
257257
}
258258

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

279-
if existingRepo.S3ArchivingConfiguration.IsConfigured() == false {
279+
if !existingRepo.S3ArchivingConfiguration.IsConfigured() {
280280
return fmt.Errorf("repository has no configuration for S3 archiving")
281281
}
282282

cmd/humioctl/repos_update.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func newReposUpdateCmd() *cobra.Command {
3434
client := NewApiClient(cmd)
3535

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

62-
if disableS3ArchivingFlag == true {
62+
if disableS3ArchivingFlag {
6363
err := client.Repositories().DisableS3Archiving(repoName)
6464
exitOnError(cmd, err, "Error disabling S3 archiving")
6565
}
6666

67-
if enableS3ArchivingFlag == true {
67+
if enableS3ArchivingFlag {
6868
err := client.Repositories().EnableS3Archiving(repoName)
6969
exitOnError(cmd, err, "Error enabling S3 archiving")
7070
}

0 commit comments

Comments
 (0)