MCPcopy
hub / github.com/perkeep/perkeep / goPathBinDir

Function goPathBinDir

make.go:202–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200}
201
202func goPathBinDir() (string, error) {
203 cmd := exec.Command("go", "env", "GOPATH")
204 out, err := cmd.Output()
205 if err != nil {
206 return "", fmt.Errorf("could not get GOPATH: %v, %s", err, out)
207 }
208 paths := filepath.SplitList(strings.TrimSpace(string(out)))
209 if len(paths) < 1 {
210 return "", errors.New("no GOPATH")
211 }
212 return filepath.Join(paths[0], "bin"), nil
213}
214
215// Create an environment variable of the form key=value.
216func envPair(key, value string) string {

Callers

nothing calls this directly

Calls 1

CommandMethod · 0.65

Tested by

no test coverage detected