golangci-lint
golang-standards/project-layout
Our great sponsors
golangci-lint | golang-standards/project-layout | |
---|---|---|
60 | 178 | |
12,551 | 39,764 | |
1.7% | 1.4% | |
9.5 | 7.9 | |
8 days ago | about 2 months ago | |
Go | Makefile | |
GNU General Public License v3.0 only | GNU General Public License v3.0 or later |
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.
golangci-lint
-
How to start a Go project in 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
-
How to integrate golangci-lint into a project?
Hey, I try to figure out an elegant way to integrate golangci into a Go project.
-
A fast HashSet implementation
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
-
Luciano Remes | Golang is πΌπ‘π’π€π¨π© Perfect
You should always use golangci-lint, which includes errcheck.
-
Go API Project Set-Up
golangci lint - https://golangci-lint.run/
-
a tool for quickly creating web and microservice code
Code inspection golangci-lint
- Introduccion a Golangci Lint
-
Thirteen Years of Go - The Go Programming Language
I disagree with at least half of your post, tooling in Go is amazing overall and there is one linter that pretty much every one is using: https://github.com/golangci/golangci-lint
golang-standards/project-layout
-
Why no src directory?
Why src directory? Git repos are for source code, such name is meaningless. For complex projects I prefer using standard go project layout. For single package or single command projects flat repo is OK.
-
Directory structure for a golang project
Standard Go Project Layout
The name of this project is misleading: https://github.com/golang-standards/project-layout/issues/185
-
What's an ideal project structure for a Golang web service?
Regarding https://github.com/golang-standards/project-layout/issues/38 what exactly is meant by "part of the project structure is a bad practice ( like vendor or pkg directories, we have something called mods now"?
-
Does this project structure make sense?
You can skip the top-level pkg β itβs not needed or recommended. +1 for Fx π€
- End to end example API written in Go
-
in which directory should i keep my application package
link to the layout structure: https://github.com/golang-standards/project-layout
-
We just migrated our Open Source Terraform Cloud alternative from Python to Golang - looking for feedback!
Though there are a few projects that do it, putting your code in a pkg subdirectory is non-standard. I don't know if you went by the supposed 'standard' project layout from a certain GitHub repo that unfortunately comes up first in search results, but you may be interested in this issue filed on that repo by one of the Go team members: https://github.com/golang-standards/project-layout/issues/117
What are some alternatives?
ireturn - Accept Interfaces, Return Concrete Types
uber-go-style-guide-kr - Uber's Go Style Guide Official Translation in Korean. Linked to the uber-go/guide as a part of contributions
modern-go-application - Modern Go Application example
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"
uber-go-style-guide-th - Uber's Go Style Guide Translation in Thai. Linked to the uber-go/guide as a part of contributions https://github.com/uber-go/guide
go-restful-api - An idiomatic Go REST API starter kit (boilerplate) following the SOLID principles and Clean Architecture
go - The Go programming language
go-sample - Go Project Sample Layout
cookiecutter-golang - A Go project template
service - Starter code for writing web services in Go using Kubernetes.