all repos — elgit @ 3bb944b8b1e79781346e71fe25e79bbc949b050a

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

optimise file existence check

Alan Pearce
commit

3bb944b8b1e79781346e71fe25e79bbc949b050a

parent

4b0c8a2ccf003a957e37506bdee5ad6829feb06c

1 file changed, 2 insertions(+), 2 deletions(-)

changed files
M routes/util.goroutes/util.go
@@ -16,9 +16,9 @@ "github.com/savsgio/atreugo/v11"
) func isGoModule(gr *git.Repo) bool { - _, err := gr.FileContent("go.mod") + has, _ := gr.HasFile("go.mod") - return err == nil + return has } func getDisplayName(name string) string {