mirror of
https://github.com/therootcompany/golib.git
synced 2026-03-02 23:57:59 +00:00
Add checkPackageMain(), which uses go/parser with PackageClauseOnly mode
(reads only the package-declaration token of each .go file — very fast)
to verify the resolved binary directory declares `package main`.
Called in groupByModule for every argument after resolving the absolute
path, before findModuleRoot. Produces a helpful error, e.g.:
monorel: error: .../io/transform/gsheet2csv is package "gsheet2csv",
not a main package
golib
Sometimes a little copying, sometimes a little dependency. Too small for their own repos.
The default branch is dev, but the stable, versioned tags are based on main.
Also, my Go Cheatsheet:
Languages
Go
100%