Skip to content

Commit

Permalink
fix: go1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Jan 19, 2024
1 parent b2e1ce1 commit a98c3b0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions load.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"path"
"slices"

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

// LayerExists returns true if layer is included in package.
func LayerExists(layer int) bool {
return slices.Contains(Layers, layer)
for _, v := range Layers {
if v == layer {
return true
}
}
return false
}

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

0 comments on commit a98c3b0

Please sign in to comment.