Nick Ripley

Nick Ripley

@nsrip.com

89 followers41 following10 posts

Nick Ripley reposted

Related #golang PSA: Gophers often mistakenly put a -u in 'go get -u foo', when they would have been better off with just 'go get foo'. 'go get foo' says to upgrade foo itself. It's shorthand for 'go get foo@upgrade' 'go get -u foo' says to *also* upgrade all the direct and indirect deps of foo.

Filippo Valsorda@filippo.abyssdomain.expert

PSA: go.sum is not a lockfile. You never need to look at go.sum. go.mod has everything you need.

Small contribution just before the Go 1.26 freeze: go.dev/cl/610815 removes the hard-coded 100ms sleep from the CPU profiler for most platforms. This will make it more efficient and unblock deeper call stacks. As a bonus, uncovered and fixed an 8 year old bug in the profiler go.dev/cl/722940 :)

Didn't end up using this, but I thought I might need a quick way for somebody to check if one of their Go dependencies calls a specific function. This one-liner does it: go list -deps -f '{{$dir := .Dir}}{{range .GoFiles}}{{$dir}}/{{.}} {{end}}' | xargs rg foo.Bar

Got a trial Financial Times subscription, and I was reading an article when I noticed my browser was crawling, using like 160% CPU. Ran out the (awesome) Firefox profiler, turns out the page is doing hundreds of HTTP requests per second to update this little chart... yikes!

You are up to date.