From 4c2843145183a4fc7d597fc87f1e03a07f123eb2 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Thu, 15 Dec 2022 16:31:04 +0800 Subject: [PATCH] fix: fix lint issue --- system/os_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/os_test.go b/system/os_test.go index e2c9d32..911605f 100644 --- a/system/os_test.go +++ b/system/os_test.go @@ -11,10 +11,10 @@ func TestOsDetection(t *testing.T) { assert := internal.NewAssert(t, "TestOsJudgment") osType, _, _ := ExecCommand("echo $OSTYPE") - if strings.Index(osType, "linux") != -1 { + if strings.Contains(osType, "linux") { assert.Equal(true, IsLinux()) } - if strings.Index(osType, "darwin") != -1 { + if strings.Contains(osType, "darwin") { assert.Equal(true, IsMac()) } }