Comment

Comment by kiitos

    Within the Google codebase and in projects using Bazel, directory layout for Go code is different than it is in open source Go projects: you can have multiple go_library targets in a single directory. A good reason to give each package its own directory is if you expect to open source your project in the future.
:o :o :o

are there really people saying that "giving each package its own directory" is in any way optional?? it is literally part of the language spec, what on earth would make anyone think otherwise??

edit: ok so bazel folks are just on a completely alternative timeline it seems

https://github.com/bazel-contrib/rules_go?tab=readme-ov-file...

    Bazel ignores go.mod files, and all package dependencies must be expressed through deps attributes in targets described with go_library and other rules.
so bazel doesn't support go, gotcha
parent kiitos 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton