Changeset View
Changeset View
Standalone View
Standalone View
doc/rpc/generate.go
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | func runCommand(command string, args ...string) string { | ||||
if err != nil { | if err != nil { | ||||
log.Fatalf("Cannot run %s: %s, is bitcoind running?", command, err.Error()) | log.Fatalf("Cannot run %s: %s, is bitcoind running?", command, err.Error()) | ||||
} | } | ||||
return string(out) | return string(out) | ||||
} | } | ||||
func run(args ...string) string { | func run(args ...string) string { | ||||
additionalArgs := os.Args[1:] | |||||
args = append(additionalArgs, args...) | |||||
return runCommand(bitcoin_cli_path, args...) | return runCommand(bitcoin_cli_path, args...) | ||||
} | } | ||||