MCPcopy Index your code
hub / github.com/go-python/gopy / argStr

Function argStr

gen.go:26–37  ·  view source on GitHub ↗

argStr returns the full command args as a string, without path to exe

()

Source from the content-addressed store, hash-verified

24
25// argStr returns the full command args as a string, without path to exe
26func argStr() string {
27 ma := make([]string, len(os.Args))
28 copy(ma, os.Args)
29 _, cmd := filepath.Split(ma[0])
30 ma[0] = cmd
31 for i := range ma {
32 if strings.HasPrefix(ma[i], "-main=") {
33 ma[i] = "-main=\"" + ma[i][6:] + "\""
34 }
35 }
36 return strings.Join(ma, " ")
37}
38
39// genOutDir makes the output directory and returns its absolute path
40func genOutDir(odir string) (string, error) {

Callers 1

NewBuildCfgFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected