MCPcopy
hub / github.com/go-task/task / shouldRunOnCurrentPlatform

Function shouldRunOnCurrentPlatform

task.go:608–618  ·  view source on GitHub ↗
(platforms []*ast.Platform)

Source from the content-addressed store, hash-verified

606}
607
608func shouldRunOnCurrentPlatform(platforms []*ast.Platform) bool {
609 if len(platforms) == 0 {
610 return true
611 }
612 for _, p := range platforms {
613 if (p.OS == "" || p.OS == runtime.GOOS) && (p.Arch == "" || p.Arch == runtime.GOARCH) {
614 return true
615 }
616 }
617 return false
618}

Callers 2

RunTaskMethod · 0.85
runCommandMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…