MCPcopy Create free account
hub / github.com/codegangsta/gin / Build

Method Build

lib/builder.go:49–73  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47}
48
49func (b *builder) Build() error {
50 args := append([]string{"go", "build", "-o", filepath.Join(b.wd, b.binary)}, b.buildArgs...)
51
52 var command *exec.Cmd
53 if b.useGodep {
54 args = append([]string{"godep"}, args...)
55 }
56 command = exec.Command(args[0], args[1:]...)
57
58 command.Dir = b.dir
59
60 output, err := command.CombinedOutput()
61
62 if command.ProcessState.Success() {
63 b.errors = ""
64 } else {
65 b.errors = string(output)
66 }
67
68 if len(b.errors) > 0 {
69 return fmt.Errorf(b.errors)
70 }
71
72 return err
73}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected