13 lines
281 B
Go
Raw Normal View History

2018-03-23 19:04:06 +01:00
package utils
2019-06-03 18:32:43 +09:00
import "github.com/animenotifier/notify.moe/arn"
2018-03-23 19:04:06 +01:00
// MaxAnime limits the number of anime that will maximally be returned.
func MaxAnime(animes []*arn.Anime, maxLength int) []*arn.Anime {
if len(animes) > maxLength {
return animes[:maxLength]
}
return animes
}