From 001495de8bc6bfdd5ea2b234751a50bb79d347e5 Mon Sep 17 00:00:00 2001 From: Jagannathan Raman Date: Thu, 22 Aug 2024 23:50:59 -0400 Subject: [PATCH] lint: fix linter error fix following lint error in cmd/cotsCreate.go: "S1002: should omit comparison to bool constant" Signed-off-by: Jagannathan Raman --- cmd/cotsCreate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/cotsCreate.go b/cmd/cotsCreate.go index 9c650a2..aea8ebb 100644 --- a/cmd/cotsCreate.go +++ b/cmd/cotsCreate.go @@ -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") } @@ -181,7 +181,7 @@ func ctsTemplateToCBOR(language string, tagID string, genUUID bool, uuidStr stri if tagID != "" { cts.SetTagIdentity(tagID, version) - } else if genUUID != false { + } else if genUUID { u := uuid.New() b, _ := u.MarshalBinary() cts.SetTagIdentity(b, version)