more admin dashboard polish, some code cleanup

This commit is contained in:
ari melody 2025-11-06 22:08:06 +00:00
parent 65f277b3f2
commit c547fca0d7
Signed by: ari
GPG key ID: CF99829C92678188
27 changed files with 187 additions and 270 deletions

View file

@ -24,8 +24,3 @@ func (track Track) GetDescriptionHTML() template.HTML {
func (track Track) GetLyricsHTML() template.HTML {
return template.HTML(strings.ReplaceAll(track.Lyrics, "\n", "<br>"))
}
// this function is stupid and i hate that i need it
func (track Track) Add(a int, b int) int {
return a + b
}

View file

@ -31,13 +31,3 @@ func Test_Track_LyricsHTML(t *testing.T) {
t.Errorf(`track lyrics incorrectly formatted (want "%s", got "%s")`, want, got)
}
}
func Test_Track_Add(t *testing.T) {
track := Track{}
want := 4
got := track.Add(2, 2)
if want != got {
t.Errorf(`somehow, we screwed up addition. (want %d, got %d)`, want, got)
}
}