only add go meta import tag if go.mod exists in repo root This is a multipart message in MIME format. Pretty self-explanitory :3 Signed-off-by: Derek Stevens <nilix@nilfm.cc>
1 file changed, 7 insertions(+), 0 deletions(-)
changed files
M routes/util.go → routes/util.go
@@ -3,7 +3,14 @@ import ( "os" "path/filepath" + + "git.icyphox.sh/legit/git" ) + +func isGoModule(gr *git.GitRepo) bool { + _, err := gr.FileContent("go.mod") + return err == nil +} func getDescription(path string) (desc string) { db, err := os.ReadFile(filepath.Join(path, "description"))