all repos — elgit @ de046690c01cf90c906ee74b8180d10f17757fb7

fork of legit: web frontend for git, written in go

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>

Derek Stevens
commit

de046690c01cf90c906ee74b8180d10f17757fb7

parent

3060c752f8bbc4852939ee7f15732e9752d0c6ec

1 file changed, 7 insertions(+), 0 deletions(-)

changed files
M routes/util.goroutes/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"))