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

Function NewBuilder

lib/builder.go:26–39  ·  view source on GitHub ↗
(dir string, bin string, useGodep bool, wd string, buildArgs []string)

Source from the content-addressed store, hash-verified

24}
25
26func NewBuilder(dir string, bin string, useGodep bool, wd string, buildArgs []string) Builder {
27 if len(bin) == 0 {
28 bin = "bin"
29 }
30
31 // does not work on Windows without the ".exe" extension
32 if runtime.GOOS == "windows" {
33 if !strings.HasSuffix(bin, ".exe") { // check if it already has the .exe extension
34 bin += ".exe"
35 }
36 }
37
38 return &builder{dir: dir, binary: bin, useGodep: useGodep, wd: wd, buildArgs: buildArgs}
39}
40
41func (b *builder) Binary() string {
42 return b.binary

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected