more admin dashboard polish, some code cleanup
This commit is contained in:
parent
65f277b3f2
commit
c547fca0d7
27 changed files with 187 additions and 270 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue