Adding Stringer interface to Objects
This commit is contained in:
parent
1a028dc2b9
commit
dfb6722dfd
1 changed files with 1 additions and 0 deletions
1
imdb.go
1
imdb.go
|
@ -193,6 +193,7 @@ func (mr MovieResult) String() string {
|
||||||
return fmt.Sprintf("#%s: %s (%s)", mr.ImdbID, mr.Title, mr.Year)
|
return fmt.Sprintf("#%s: %s (%s)", mr.ImdbID, mr.Title, mr.Year)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Stringer Interface for SearchResult
|
||||||
func (sr SearchResult) String() string {
|
func (sr SearchResult) String() string {
|
||||||
return fmt.Sprintf("#%s: %s (%s) Type: %s", sr.ImdbId, sr.Title, sr.Year, sr.Type)
|
return fmt.Sprintf("#%s: %s (%s) Type: %s", sr.ImdbId, sr.Title, sr.Year, sr.Type)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue