emdb/cmd/terminal-client/tui/movie.go

24 lines
320 B
Go
Raw Normal View History

2023-12-22 15:50:42 +01:00
package tui
import (
"fmt"
"ewintr.nl/emdb/movie"
)
type Movie struct {
m movie.Movie
}
func (m Movie) FilterValue() string {
return m.m.Title
}
func (m Movie) Title() string {
2023-12-22 16:31:40 +01:00
return fmt.Sprintf("%s (%d)", m.m.Title, m.m.Year)
2023-12-22 15:50:42 +01:00
}
func (m Movie) Description() string {
2023-12-22 16:31:40 +01:00
return fmt.Sprintf("%s", m.m.Summary)
2023-12-22 15:50:42 +01:00
}