this post was submitted on 06 May 2025
8 points (100.0% liked)

Golang

2434 readers
8 users here now

This is a community dedicated to the go programming language.

Useful Links:

Rules:

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] sxan@midwest.social 2 points 3 days ago

I took a decidedly minimalist dependency stance a while ago, and I'm glad about it. It's hard; you also don't want to be writing bespoke libraries for everything, but what really got me on this kick was viper and cobra. Using cobra adds 32,400 LOC to your project. To parse flags. 19,600 of those are in cobra's dependencies, which - of course, you also have to vet.

Especially when I'm writing libraries myself, I go to fairly extreme lengths to have an empty go.mod; at least my users only have to audit my project, and not some branching nest of dependencies.