9 ms·
>The whole point of using Go is to explicitly handle errors as they happen That's hardly the whole point of using Go. The friendlier syntax (and in this case
by coldtea 3y ago
>The whole point of using Go is to explicitly handle errors as they happen
That's hardly the whole point of using Go.
The friendlier syntax (and in this case DSL) is an ever bigger point.
In any case, you can trivially get at the error at the point it occured:
n, err := script.File("test.txt").Match("Error").CountLines()