aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2021-01-01 15:02:31 +0100
committerLaria Carolin Chabowski <laria@laria.me>2021-01-01 15:02:31 +0100
commit33950df247e3fdaf5339c11995e39fd10ae85262 (patch)
tree2a0f75043c8afab4d6785f4be13f64055875b831
parent976122914b1eee6f050e2ae25096377efbf0a3da (diff)
downloadcode.laria.me-master.tar.gz
code.laria.me-master.tar.bz2
code.laria.me-master.zip
LoadProject: Only cut off last file extension to get project nameHEADmaster
-rw-r--r--projects/project.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/projects/project.go b/projects/project.go
index 85239c9..e0f6d67 100644
--- a/projects/project.go
+++ b/projects/project.go
@@ -47,7 +47,9 @@ func LoadProject(name string) (p Project, err error) {
p.dir = path.Dir(name)
p.formatReadme()
- p.Name = strings.Split(path.Base(name), ".")[0]
+
+ nameParts := strings.Split(path.Base(name), ".")
+ p.Name = strings.Join(nameParts[:len(nameParts)-1], ".")
return
}