Skip to content

Commit a98c3b0

Browse files
committed
fix: go1.20
1 parent b2e1ce1 commit a98c3b0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

load.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"encoding/json"
66
"fmt"
77
"path"
8-
"slices"
98

109
"github.com/go-faster/errors"
1110
)
@@ -32,7 +31,12 @@ const LayerLatest = 170
3231

3332
// LayerExists returns true if layer is included in package.
3433
func LayerExists(layer int) bool {
35-
return slices.Contains(Layers, layer)
34+
for _, v := range Layers {
35+
if v == layer {
36+
return true
37+
}
38+
}
39+
return false
3640
}
3741

3842
// ErrNotFound means that current package version does not support requested layer.

0 commit comments

Comments
 (0)