
SWE; SRE | dereferencing that void | all around debugger
Norway
Joined March 2018
- Tweets222
- Following894
- Followers60
- Likes1K
David0 retweeted
A Terminal client for HTTP/GraphQL/gRPC with support for SSH tunnels, WebSockets, SSE, workflows, profiling, OpenAPI and response diffs.
#golang
github.com/unkn0wn-root/rest…
David0 retweeted
Big Go win today 👀💪
devblogs.microsoft.com/types…
David0 retweeted
Episode 9 is now available! In this episode, @sudomateo , @skriptble , @IanLopshire , and @DylanBourque discuss tools they love. From tech tools to office gear to stationery. This episode has bonus content for Fallthrough subscribers. Happy Listening!
zurl.co/ISOPv
David0 retweeted
We've published episode 6! Go 1.24 will be released soon and in the Go Time tradition our "What's New In Go?" correspondent Carlana Johnson joins special guest host Johnny Boursiquot to discuss the changes in the upcoming release. Happy Listening!
zurl.co/7YgdG
David0 retweeted
Data size is one of Protobuf's advantages. Learn its encoding techniques—they are widely used in many highly optimized systems: victoriametrics.com/blog/go-…
David0 retweeted
100%. Ready to go. The release will probably be on the 26th though so I can take time to enjoy the holidays with my family without stressing about inevitable launch day issues. For those interested: thanks for hanging in there, not long now. Happy holidays y'all. ❤️
David0 retweeted
It's been a long time since I last wrote; how about starting with a fresh idea?
victoriametrics.com/blog/go-…
David0 retweeted
A Go package to Initialize structs with default values
#golang
github.com/creasty/defaults
David0 retweeted
Kubero is a fully self-hosted Internal Developer Platform that brings Heroku's workflows to your Kubernetes cluster
It enables you to deploy your applications with a few clicks, has a built-in CI/CD pipeline, and supports multiple staging environments
➜ github.com/kubero-dev/kubero
David0 retweeted
The big demo for Kamal 2 is done. The why, the how, and deployment of both Go and Rails apps, single server and fleet. I crammed a lot into this one! youtu.be/QC4b2teG_hc?si=oDZG…
David0 retweeted
Proud to share that my wife and I have pledged $300,000 to the Zig Software Foundation. Zig has been an absolute joy to use but more importantly I think their culture, vision, and project structure is a bright star for the future of systems programming. mitchellh.com/writing/zig-do…
David0 retweeted
The unique package in Go 1.23 is a great way to optimize your resources.
E.g., if you have a bunch of the same strings, instead of creating new copies of identical strings (or other values) over and over, it allows you to reuse the same memory for those values.
David0 retweeted
gcc 14 is about to make me a c programmer with this one weird trick
-Wanalyzer-out-of-bounds
David0 retweeted
🦀jnv is designed for navigating JSON, offering an interactive JSON viewer and jq filter editor
github.com/ynqa/jnv
#rustlang #rust #linux #devops
David0 retweeted
💡 Golang Tip #46: Avoid using break in switch cases, except when paired with labels.
In C, C#, Javascript,… it's common to see a break at the end of each case in a switch statement:
This is done to prevent the code from inadvertently falling through to the next case.
But Go handles it differently, each case in a Go switch comes with an implicit break.
This means Go automatically stops after executing a matched case, removing the need for explicit break statements:
The choice to automatically exit a switch after a case matches is intentional.
Most often, that's exactly what you need, to stop once you've found a match, and it's rare to want to keep going. And Go focuses on what's typically needed, rather than the exceptions (?).
> “What if I want to continue?”
Go provides a solution for this rare need with the fallthrough keyword, allowing the execution to pass from one case to the next intentionally.
Now, what if we're using a switch inside a loop and want to break out of the loop?
A break inside a switch doesn't affect the enclosing loop, if we want to exit the loop based on a condition in a switch, we'll need to use labels:
Using a label allows you to specify exactly where you want to break out.
---
6 ways to use switch in Go teapaw.org/func25/status/17…
Tip #31: Loop labels for cleaner breaks and continues
teapaw.org/func25/status/17…
💡Golang Tip #31: Loop labels for cleaner breaks and continues
Labels and goto can be tricky and are often avoided because they can make code less readable:
The example above may seem clear due to its simplicity. But as the complexity grows, code can become hard to follow:
- You might have to trace the label 'hundreds of miles' away from the goto statement.
- With your eyes moving up and down the code to follow where the goto statement leads.
Loop labels
For instance, when managing nested loops, using loop labels is generally seen as good practice in certain contexts.
Imagine we're searching for a number within 2D arrays:
Now, here's a more elegant solution: a loop label allows you to name a loop.
Once named, you can use break or continue followed by the label to control not just the current loop, but any surrounding loops as well.
And the result?
Code that's not only shorter but also cleaner, easier to understand.
We can use loop label with both 'break' and 'continue'
Another useful case, when using loop with select{}.
If you use break in a select statement without a label, you'll only exit the select, not the loop containing it.
#golang
David0 retweeted
I'm happy to annonce that the first version of our SSH3 design document is out ! ✨ Let us know your feedback and thoughts.
ietf.org/archive/id/draft-mi…
The implementation is publicly available: github.com/francoismichel/ss…

































