25 lines
512 B
Go
Raw Normal View History

2018-03-09 05:12:22 +01:00
package animediff
2018-03-09 04:58:36 +01:00
import "strings"
2018-03-09 05:12:22 +01:00
// Genres describes differing genres.
type Genres struct {
2018-03-09 04:58:36 +01:00
GenresA []string
GenresB []string
}
// String returns the description.
2018-03-09 05:12:22 +01:00
func (diff *Genres) String() string {
2018-03-09 04:58:36 +01:00
return "Genres are different"
}
// DetailsA shows the details for the first anime.
2018-03-09 05:12:22 +01:00
func (diff *Genres) DetailsA() string {
2018-03-09 04:58:36 +01:00
return strings.Join(diff.GenresA, ", ")
}
// DetailsB shows the details for the second anime.
2018-03-09 05:12:22 +01:00
func (diff *Genres) DetailsB() string {
2018-03-09 04:58:36 +01:00
return strings.Join(diff.GenresB, ", ")
}