A little cleanup

This commit is contained in:
2025-12-04 10:41:48 -06:00
parent 51323ad5a7
commit e126ed0aa8

View File

@@ -1,3 +1,4 @@
// Package projecttxt implements struct and routines for working with project.txt files
package projecttxt
import (
@@ -43,9 +44,7 @@ func ParseProject(text string) (*Project, error) {
switch v[0] {
case '^': // Project Directory
project.Directory = v[1:]
if strings.HasSuffix(project.Directory, "/") {
project.Directory = strings.TrimSuffix(project.Directory, "/")
}
project.Directory = strings.TrimSuffix(project.Directory, "/")
case '~': // Project Repo
project.Repo = v[1:]
if strings.HasPrefix(project.Repo, "/") {