Browse Source

hostinfo: fix a couple of logic simplification lints

Updates #cleanup
Signed-off-by: James Tucker <[email protected]>
James Tucker 2 years ago
parent
commit
01604c06d2
1 changed files with 2 additions and 8 deletions
  1. 2 8
      hostinfo/hostinfo.go

+ 2 - 8
hostinfo/hostinfo.go

@@ -335,10 +335,7 @@ func inAzureAppService() bool {
 }
 
 func inAWSFargate() bool {
-	if os.Getenv("AWS_EXECUTION_ENV") == "AWS_ECS_FARGATE" {
-		return true
-	}
-	return false
+	return os.Getenv("AWS_EXECUTION_ENV") == "AWS_ECS_FARGATE"
 }
 
 func inFlyDotIo() bool {
@@ -364,10 +361,7 @@ func inKubernetes() bool {
 }
 
 func inDockerDesktop() bool {
-	if os.Getenv("TS_HOST_ENV") == "dde" {
-		return true
-	}
-	return false
+	return os.Getenv("TS_HOST_ENV") == "dde"
 }
 
 func inHomeAssistantAddOn() bool {