Skip to content

Commit

Permalink
Remove generic function from code.
Browse files Browse the repository at this point in the history
  • Loading branch information
tetafro committed Feb 18, 2024
1 parent 4b089bf commit cde649d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yandex.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ type Track struct {

// String returns string representation of the track.
func (t Track) String() string {
artists := t.Artists[:min(len(t.Artists), 3)]
artists := t.Artists
if len(artists) > 3 {
artists = artists[:3]
}
s := fmt.Sprintf("%s - %s", strings.Join(artists, ", "), t.Title)
s = strings.ReplaceAll(s, "/", "-")
return s
Expand Down

0 comments on commit cde649d

Please sign in to comment.