Better HN
topnewbestaskshowjobs
Log inSign up

eik

17 karma · joined Sep 2, 2024 (2y ago) · 17 submissions

Submissions

1.

Errortype v0.0.12: auto-fixing Go error names, and gopls's ptrtoerror(reddit.com ↗)

2 points · by eik · 1d ago · discuss

2.

ScopeGuard 0.0.7: Your Go-to linter for scope and shadow issues, now with MCP(old.reddit.com ↗)

2 points · by eik · 6mo ago · discuss

3.

The error handling bugs that worry me aren't the ones that crash(old.reddit.com ↗)

1 points · by eik · 9mo ago · discuss

comment 9mo ago · link · parent

ScopeGuard is a Go linter that helps you write more readable and maintainable code by suggesting tighter variable scope.

5.

ScopeGuard v0.0.5: Improved Shadow Detection(old.reddit.com ↗)

1 points · by eik · 9mo ago · 1 comment

6.

Go: Nested Assignments and New ScopeGuard Version(old.reddit.com ↗)

1 points · by eik · 11mo ago · discuss

7.

ScopeGuard 0.0.2 – Go analyzer for tighter scopes(old.reddit.com ↗)

2 points · by eik · 11mo ago · discuss

comment 1y ago · link · parent

Blog Post: https://blog.fillmore-labs.com/posts/scope-1/

Go Analyzer: https://github.com/fillmore-labs/scopeguard#scopeguard

9.

Minimizing Variable Scope in Go: New Blog Post and Static Analyzer Tool(old.reddit.com ↗)

1 points · by eik · 1y ago · 1 comment

comment 1y ago · link · parent

Announcement of the release of errortype v0.0.5, a Go linter that helps catch subtle bugs in error handling.

https://github.com/fillmore-labs/errortype#errortype

11.

Errortype v0.0.5 Released – Now with golangci-lint Plugin Support(old.reddit.com ↗)

1 points · by eik · 1y ago · 1 comment

comment 1y ago · link · parent

Yes, but “an Is method should only shallowly compare err and the target and not call Unwrap on either”:

https://pkg.go.dev/errors#Is

comment 1y ago · link · parent

The linter in the post is `err113`. `errortype` does already warn:

https://github.com/fillmore-labs/errortype#errortype

comment 1y ago · link · parent

Having looked at the problems that can arise with errors.As:

https://news.ycombinator.com/item?id=44959638

Let's now look at how errors.Is can introduce subtle bugs that can affect the reliability of error checking, especially when trying to determine the root cause of an error.

How one letter can make such a difference…

15.

The Day the Linter Broke My Code(blog.fillmore-labs.com ↗)

25 points · by eik · 1y ago · 6 comments

comment 1y ago · link · parent

I recently dove deep into an unexpectedly tricky issue in Go error handling — how using errors.As with pointers vs. values can silently change program behavior, and I wanted to share what I learned.

The Blog Post

I walk through the core mechanics, point out how the dynamic type (pointer vs. value) matters, and offer a simple, effective two-step approach to prevent these silent bugs.

17.

Understanding Go Error Types: Pointer vs. Value(blog.fillmore-labs.com ↗)

5 points · by eik · 1y ago · 1 comment