Skip to content

Commit

Permalink
Merge pull request #1 from jraman567/linter-fix
Browse files Browse the repository at this point in the history
lint: fix linter error
  • Loading branch information
thomas-fossati authored Aug 23, 2024
2 parents 775b203 + 001495d commit 7cb0f9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/cotsCreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func checkctsCreateCtsArgs() error {
return errors.New("no environment template supplied")
}

if (*cotsCreateTagUUID != false && *cotsCreateTagID != "") || (*cotsCreateTagUUID != false && *cotsCreateTagUUIDStr != "") || (*cotsCreateTagUUIDStr != "" && *cotsCreateTagID != "") {
if (*cotsCreateTagUUID && *cotsCreateTagID != "") || (*cotsCreateTagUUID && *cotsCreateTagUUIDStr != "") || (*cotsCreateTagUUIDStr != "" && *cotsCreateTagID != "") {
return errors.New("only one of --uuid, --uuid-str and --id can be used at the same time")
}

Expand Down Expand Up @@ -181,7 +181,7 @@ func ctsTemplateToCBOR(language string, tagID string, genUUID bool, uuidStr stri

if tagID != "" {

Check failure on line 182 in cmd/cotsCreate.go

View workflow job for this annotation

GitHub Actions / Lint

ifElseChain: rewrite if-else to switch statement (gocritic)
cts.SetTagIdentity(tagID, version)
} else if genUUID != false {
} else if genUUID {
u := uuid.New()
b, _ := u.MarshalBinary()
cts.SetTagIdentity(b, version)
Expand Down

0 comments on commit 7cb0f9e

Please sign in to comment.