MCPcopy
hub / github.com/sirupsen/logrus / CrossBuild

Function CrossBuild

ci/magefile.go:87–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85}
86
87func CrossBuild() error {
88 matrix, err := getBuildMatrix()
89 if err != nil {
90 return err
91 }
92
93 for os, arches := range matrix {
94 for _, arch := range arches {
95 env := map[string]string{
96 "GOOS": os,
97 "GOARCH": arch,
98 }
99 if mg.Verbose() {
100 fmt.Printf("Building for GOOS=%s GOARCH=%s\n", os, arch)
101 }
102 if err := sh.RunWith(env, "go", "build", "./..."); err != nil {
103 return err
104 }
105 }
106 }
107 return nil
108}
109
110func Lint() error {
111 gopath := os.Getenv("GOPATH")

Callers

nothing calls this directly

Calls 2

getBuildMatrixFunction · 0.85
PrintfMethod · 0.65

Tested by

no test coverage detected