We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbfcf32 commit 8f7d5e4Copy full SHA for 8f7d5e4
1 file changed
internal/node/fs/util.go
@@ -41,8 +41,14 @@ func supportsFS(instance *crusoeapi.InstanceV1Alpha5) bool {
41
}
42
43
// All CPU instances support shared filesystems
44
- if typeSegments[0] == "c1a" || typeSegments[0] == "s1a" ||
45
- typeSegments[0] == "c2a" || typeSegments[0] == "s2a" {
+ // Using map for O(1) lookup instead of slice with O(n) slices.Contains()
+ supportedTypes := map[string]bool{
46
+ "c1a": true,
47
+ "s1a": true,
48
+ "c2a": true,
49
+ "s2a": true,
50
+ }
51
+ if supportedTypes[typeSegments[0]] {
52
return true
53
54
0 commit comments