13 lines
270 B
Go
Raw Normal View History

2018-03-23 18:04:06 +00:00
package utils
import "github.com/animenotifier/arn"
// 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
}