Skip to content

Commit

Permalink
Capitalize source.kind for use as search filter
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuswhybrow committed Apr 23, 2024
1 parent 75c0d73 commit 1a231d8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions cmd/ray-peat-rodeo/chat.templ
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package main
import "github.com/marcuswhybrow/ray-peat-rodeo/internal/global"
import "fmt"
import "strings"
import "golang.org/x/text/cases"
import "golang.org/x/text/language"

type MapEnumeration[V any] struct {
Key string
Expand Down Expand Up @@ -41,14 +43,8 @@ func kindToFilter(kind string) string {
return "Video Interview"
case "text":
return "Written Interview"
case "article":
return "Article"
case "newsletter":
return "Newsletter"
case "book":
return "Book"
default:
return kind
return cases.Title(language.English, cases.Compact).String(kind)
}
}

Expand Down

0 comments on commit 1a231d8

Please sign in to comment.