Open utterances-bot opened 1 year ago
Why are you passing InputOutput twice ('p' and the function argument InputOutput)? is it possible to simplify that?
@aphsa, the first InputOutput, p
, is the function parameter, the second, is the return of the function.
So, the function receives just one InputOutput, and returns another one and an error, which will be nil if everything goes well.
TBH, I wish this were more idiomatic in Go because it simplifies it when you have several operations applied to some data.
Generic Go Pipelines · Preslav Rachev
I am a software engineer with a decade-long experience developing software using Java, Go, and Elixir.
https://preslav.me/2021/09/04/generic-golang-pipelines/