Possible error at the usage example for Golang RPC section #13023
-
Community Support Policy
RabbitMQ version used4.0.3 How is RabbitMQ deployed?Debian package Steps to reproduce the behavior in questionFor Golang RPC section in func bodyFrom(args []string) int {
var s string
if (len(args) < 2) || os.Args[1] == "" {
s = "30"
} else {
s = strings.Join(args[1:], " ") // <------ here
}
n, err := strconv.Atoi(s)
failOnError(err, "Failed to convert arg to integer")
return n
} I wonder if this supposed to be that way, because for any number of arguments greater than 2 we're getting a string of the form Could you please clarify if this is intended behavior, or am I just being blind? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@humble1eenok you are welcome to submit a PR that modifies the tutorial. The idea is to read an integer to send to the (request-reply) server, nothing particularly creative. The tutorials can be found in the website repo, and their executable versions are under |
Beta Was this translation helpful? Give feedback.
@humble1eenok you are welcome to submit a PR that modifies the tutorial. The idea is to read an integer to send to the (request-reply) server, nothing particularly creative.
The tutorials can be found in the website repo, and their executable versions are under
rabbitmq/rabbitmq-tutorials
. So any change should be applied to both repos.