Re:Ask HN: Modern Go Dev Setup
by stop50 on Sunday October 16, 2022 @12:37PM
(#33224953)
I came from the same direction. I put gopath on a ramdisk, because its an cacge which is polluted fast with old versions. GOBIN is set to ~/.local/bin, so the installed go binaries are static and in the path.
fo itself has most tooling integrated:
black = go fmt
poetry = go.mod
sphinx = go doc/godoc
For linting i use revive, which i selected in vscode.
since modules are path based the directory structure has everything at the root path.
i put the files with the main function usually in cmd or one sublevel below it.
if you have multiple binaries in one repo you have to move them into their own directories or building gets messy.
For linting i use revive, which i selected in vscode. since modules are path based the directory structure has everything at the root path. i put the files with the main function usually in cmd or one sublevel below it. if you have multiple binaries in one repo you have to move them into their own directories or building gets messy.