mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-06 13:42:28 +08:00
fix: fix lint issue
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user