4 ms·
I believe error handling looks like this: package main import ( "github.com/bitfield/script" ) func main() { _, err := scrip
by simonw 3y ago
I believe error handling looks like this:
package main
import (
"github.com/bitfield/script"
)
func main() {
_, err := script.Stdin().Column(1).Freq().First(10).Stdout()
if err != nil {
log.Fatal(err)
}
}
Errors are "remembered" by the pipeline and can be processed when you get to a sink method.