News for hackers. Stuff that matters.
Re:Scripting with Go: A Modest Proposal by coldtea on Sunday August 20, 2023 @11:52AM (#37200293)
>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()

There are no comments on this comment yet.