34 lines
776 B
Go
Raw Normal View History

2018-03-09 04:12:22 +00:00
package animediff
// CanonicalTitle describes differing titles.
type CanonicalTitle struct {
2018-03-09 13:48:00 +00:00
TitleA string
TitleB string
NumericHash uint64
2018-03-09 04:12:22 +00:00
}
2018-03-09 12:42:45 +00:00
// Type returns the diff type.
func (diff *CanonicalTitle) Type() string {
return "CanonicalTitle"
}
// Explanation returns the description.
func (diff *CanonicalTitle) Explanation() string {
2018-03-09 04:12:22 +00:00
return "Canonical titles are different"
}
// DetailsA shows the details for the first anime.
func (diff *CanonicalTitle) DetailsA() string {
return diff.TitleA
}
// DetailsB shows the details for the second anime.
func (diff *CanonicalTitle) DetailsB() string {
return diff.TitleB
}
2018-03-09 13:48:00 +00:00
// Hash returns the hash for the suggested value (from anime B).
func (diff *CanonicalTitle) Hash() uint64 {
return diff.NumericHash
}