Added canonical title diff
This commit is contained in:
24
utils/AnimeGenresDiff.go
Normal file
24
utils/AnimeGenresDiff.go
Normal file
@ -0,0 +1,24 @@
|
||||
package utils
|
||||
|
||||
import "strings"
|
||||
|
||||
// AnimeGenresDiff describes differing genres.
|
||||
type AnimeGenresDiff struct {
|
||||
GenresA []string
|
||||
GenresB []string
|
||||
}
|
||||
|
||||
// String returns the description.
|
||||
func (diff *AnimeGenresDiff) String() string {
|
||||
return "Genres are different"
|
||||
}
|
||||
|
||||
// DetailsA shows the details for the first anime.
|
||||
func (diff *AnimeGenresDiff) DetailsA() string {
|
||||
return strings.Join(diff.GenresA, ", ")
|
||||
}
|
||||
|
||||
// DetailsB shows the details for the second anime.
|
||||
func (diff *AnimeGenresDiff) DetailsB() string {
|
||||
return strings.Join(diff.GenresB, ", ")
|
||||
}
|
Reference in New Issue
Block a user