MCPcopy Create free account
hub / github.com/divan/gotrace / ProcessCommands

Function ProcessCommands

main.go:51–65  ·  view source on GitHub ↗

ProcessCommands processes command list.

(out string, cmds Commands)

Source from the content-addressed store, hash-verified

49
50// ProcessCommands processes command list.
51func ProcessCommands(out string, cmds Commands) {
52 params := GuessParams(cmds)
53
54 data := cmds.toJSON()
55 if out != "" {
56 err := ioutil.WriteFile(out, data, 0644)
57 if err != nil {
58 panic(err)
59 }
60 fmt.Printf("Written commands to %s\n", out)
61 return
62 }
63
64 StartServer(":2000", data, params)
65}
66
67// Usage prints usage information, overriding default one.
68func Usage() {

Callers 1

mainFunction · 0.85

Calls 3

GuessParamsFunction · 0.85
StartServerFunction · 0.85
toJSONMethod · 0.80

Tested by

no test coverage detected