|about 22 hours ago||7 months ago|
|GNU General Public License v3.0 only||MIT License|
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Building RESTful API with Hexagonal Architecture in Go
21 projects | dev.to | 27 Sep 2023
Golangci-lint is a tool for checking Go code quality, finding issues, bugs, and style problems. It helps keep the code clean and maintainable.
Structured Logging with Slog
11 projects | news.ycombinator.com | 22 Aug 2023
This is such an infuriating problem. I'm convinced I'm using Go wrong, because I simply can't understand how this doesn't make it a toy language. Why the $expletive am I wasting 20-30 and more minutes per week of my life looking for the source of an error!?
Have you seen https://github.com/tomarrell/wrapcheck? It's a linter than does a fairly good job of warning when an error originates from an external package but hasn't been wrapped in your codebase to make it unique or stacktraced. It comes with https://github.com/golangci/golangci-lint and can even be made part of your in-editor LSP diagnostics.
But still, it's not perfect. And so I remain convinced that I'm misunderstanding something fundamental about the language because not being able to consistently find the source of an error is such an egregious failing for a programming language.
Seeking Insights: Tools Used in GitHub Actions for Security Code Checks and Vulnerability Detection
2 projects | /r/golang | 6 Jul 2023
Is it a bad convention to overwrite err variable?
2 projects | /r/golang | 28 Jun 2023
You should be using golangci-lint, because all serious Go programmers should. golangci-lint contains errcheck, which will detect if you overwrite an error without having done something with it in the meantime. I consider this one of the most important linters (this doesn't just detect things that may sorta kinda someday turn into bugs, this quite likely is a bug RIGHT NOW), and it helps you have the confidence you can overwrite errors as you go and don't need to keep allocating new ones.
Golang’s best-kept secret: ‘executable examples’
5 projects | news.ycombinator.com | 10 Jun 2023
Note that without the `Output:` line you can silently not be running these tests - https://github.com/golangci/golangci-lint/issues/3084 covers when this can be problematic and there's now a golangci-lint integrated linter for catching it
How to start a Go project in 2023
21 projects | news.ycombinator.com | 23 May 2023
Things I can't live without in a new Go project in no particular order:
- https://github.com/golangci/golangci-lint - meta-linter
- https://goreleaser.com - automate release workflows
- https://magefile.org - build tool that can version your tools
- https://github.com/ory/dockertest/v3 - run containers for e2e testing
- https://github.com/ecordell/optgen - generate functional options
- https://golang.org/x/tools/cmd/stringer - generate String()
- https://mvdan.cc/gofumpt - stricter gofmt
- https://github.com/stretchr/testify - test assertion library
- https://github.com/rs/zerolog - logging
- https://github.com/spf13/cobra - CLI framework
FWIW, I just lifted all the tools we use for https://github.com/authzed/spicedb
We've also written some custom linters that might be useful for other folks: https://github.com/authzed/spicedb/tree/main/tools/analyzers
Just migrated our Open Source project to Golang
4 projects | news.ycombinator.com | 21 Mar 2023
How to integrate golangci-lint into a project?
2 projects | /r/golang | 13 Feb 2023
Hey, I try to figure out an elegant way to integrate golangci into a Go project.
A fast HashSet implementation
3 projects | /r/golang | 13 Feb 2023
All of this is nitpicking really, but I would suggest using linters, e.g. https://github.com/golangci/golangci-lint - sometimes annoying, but mostly just helps to avoid discussions like this (and plethora of bugs).
Go 1.20 released
3 projects | /r/golang | 1 Feb 2023
What are some alternatives?
ireturn - Accept Interfaces, Return Concrete Types
gosec - Golang security checker
golangci-lint-action - Official GitHub action for golangci-lint from its authors
gopl.io - Example programs from "The Go Programming Language"
go - The Go programming language
ls-lint - An extremely fast directory and filename linter - Bring some structure to your project filesystem
go-tools - Staticcheck - The advanced Go linter
golang-standards/project-layout - Standard Go Project Layout
maligned - Tool to detect Go structs that would take less memory if their fields were sorted.
reviewdog - 🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
viper - Go configuration with fangs
gofumpt - A stricter gofmt