aboutsummaryrefslogtreecommitdiff
path: root/routes/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'routes/util.go')
-rw-r--r--routes/util.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/routes/util.go b/routes/util.go
index 1b31b17..27c26ce 100644
--- a/routes/util.go
+++ b/routes/util.go
@@ -16,6 +16,14 @@ func isGoModule(gr *git.GitRepo) bool {
return err == nil
}
+func getDisplayName(name string) string {
+ l := len(name) - 4
+ if name[l:] == ".git" {
+ name = name[:l]
+ }
+ return name
+}
+
func getDescription(path string) (desc string) {
db, err := os.ReadFile(filepath.Join(path, "description"))
if err == nil {