Our great sponsors
- SonarLint - Clean code begins in your IDE with SonarLint
- ONLYOFFICE ONLYOFFICE Docs — document collaboration in your environment
- InfluxDB - Access the most powerful time series database as a service
- CodiumAI - TestGPT | Generating meaningful tests for busy devs
-
Currently it is encoded as null. This is a source of bugs in many non-theoretical cases (eg consumers of JSON APIs). There are many issues on Google about others falling into this pitfall so it is at least not uncommon. https://github.com/golang/go/issues/27589
-
Puts Debuggerer
Ruby library for improved puts debugging, automatically displaying bonus useful information such as source line number and source code.
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
Rust's serde framework is great. Here's the example for json. And it supports 21 formats other than JSON.
-
A quick google search finds this library - it mentions returning optionalT which to me implies it uses generics, but I can’t confirm it does as I haven’t learnt Go yet and don’t know the syntax!
-
I honestly, truly, don't get why a lot of programmers get stuck on this "less code" and confusing obtuse syntax that some languages offer as features. Reminds me of the Obfuscated C contest from way back (which I guess is still ongoing here: https://www.ioccc.org/). I much prefer Go's simple straight forward, less complex code. No trickery or magic, just easy to read code. I'm not saying your example code uses any said magic, just that is a common refrain I hear a lot on the golang reddit (verbosity of Go, particularly around error handling, and how using this or that trick would result in less lines of code).
-
Here's one that uses generics, here's a more elaborate one.
-
Here's one that uses generics, here's a more elaborate one.
-
ONLYOFFICE
ONLYOFFICE Docs — document collaboration in your environment. Powerful document editing and collaboration in your app or environment. Ultimate security, API and 30+ ready connectors, SaaS or on-premises
-
It’s archived for posterity. https://github.com/octokit/go-octokit
-
Clippy
A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
I wish Google would invest more in go vet so it could do many of the things for which we currently rely on hobby-level tools that are rarely matured and often abandoned. ESLint, Clippy, and even clang-tidy show how much more comprehensive and mature lint suites can be, despite Go being easier to analyze than those languages.
-
I wish Google would invest more in go vet so it could do many of the things for which we currently rely on hobby-level tools that are rarely matured and often abandoned. ESLint, Clippy, and even clang-tidy show how much more comprehensive and mature lint suites can be, despite Go being easier to analyze than those languages.
-
there’s a linter for exhaustive matching: https://github.com/nishanths/exhaustive
-