1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-14 17:52:28 +08:00

fix: fix lint issue

This commit is contained in:
dudaodong
2022-12-15 16:31:04 +08:00
parent 168ed096c7
commit 4c28431451

View File

@@ -11,10 +11,10 @@ func TestOsDetection(t *testing.T) {
assert := internal.NewAssert(t, "TestOsJudgment") assert := internal.NewAssert(t, "TestOsJudgment")
osType, _, _ := ExecCommand("echo $OSTYPE") osType, _, _ := ExecCommand("echo $OSTYPE")
if strings.Index(osType, "linux") != -1 { if strings.Contains(osType, "linux") {
assert.Equal(true, IsLinux()) assert.Equal(true, IsLinux())
} }
if strings.Index(osType, "darwin") != -1 { if strings.Contains(osType, "darwin") {
assert.Equal(true, IsMac()) assert.Equal(true, IsMac())
} }
} }