Repo & Notes in string func

This commit is contained in:
Brian Buller 2023-09-12 10:43:41 -05:00
parent 13f20412ba
commit 3728b9b14f

View File

@ -126,6 +126,12 @@ func getParts(text string) []string {
func (project Project) String() string { func (project Project) String() string {
text := fmt.Sprintf("%s ", project.Name) text := fmt.Sprintf("%s ", project.Name)
text += fmt.Sprintf("^%s ", project.Directory) text += fmt.Sprintf("^%s ", project.Directory)
if project.Repo != "" {
text += fmt.Sprintf("~%s ", project.Repo)
}
if project.Notes != "" {
text += fmt.Sprintf("#%s ", project.Notes)
}
if len(project.Contexts) > 0 { if len(project.Contexts) > 0 {
sort.Strings(project.Contexts) sort.Strings(project.Contexts)
for _, context := range project.Contexts { for _, context := range project.Contexts {