MCPcopy Index your code
hub / github.com/jetify-com/devbox / selectForSystem

Function selectForSystem

internal/lock/resolve.go:155–166  ·  view source on GitHub ↗
(systems map[string]V)

Source from the content-addressed store, hash-verified

153}
154
155func selectForSystem[V any](systems map[string]V) (v V, err error) {
156 if v, ok := systems[nix.System()]; ok {
157 return v, nil
158 }
159 if v, ok := systems["x86_64-linux"]; ok {
160 return v, nil
161 }
162 for _, v := range systems {
163 return v, nil
164 }
165 return v, redact.Errorf("no systems found")
166}
167
168func buildLockSystemInfos(pkg *searcher.PackageVersion) (map[string]*SystemInfo, error) {
169 // guard against missing search data

Callers 2

FetchResolvedPackageMethod · 0.85
resolveV2Function · 0.85

Calls 2

SystemFunction · 0.92
ErrorfFunction · 0.92

Tested by

no test coverage detected