diff options
author | Anirudh Oppiliappan <x@icyphox.sh> | 2024-07-05 19:56:24 +0300 |
---|---|---|
committer | Anirudh Oppiliappan <x@icyphox.sh> | 2024-07-05 19:56:24 +0300 |
commit | 68f08e38aada8d5e8f89679121beef9104430942 (patch) | |
tree | 885c0e0e329f815863c69ca7d715965d25deafd8 /routes/util.go | |
parent | routes: ignore files (diff) | |
download | legitrx-68f08e38aada8d5e8f89679121beef9104430942.tar.gz legitrx-68f08e38aada8d5e8f89679121beef9104430942.tar.zst legitrx-68f08e38aada8d5e8f89679121beef9104430942.zip |
git: fix getDisplayName
Diffstat (limited to 'routes/util.go')
-rw-r--r-- | routes/util.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/routes/util.go b/routes/util.go index 27c26ce..7d444d0 100644 --- a/routes/util.go +++ b/routes/util.go @@ -17,11 +17,7 @@ func isGoModule(gr *git.GitRepo) bool { } func getDisplayName(name string) string { - l := len(name) - 4 - if name[l:] == ".git" { - name = name[:l] - } - return name + return strings.TrimSuffix(name, ".git") } func getDescription(path string) (desc string) { |