From f2b941bc03e1123d2821a343439347564c3ec65c Mon Sep 17 00:00:00 2001 From: "Diogo Franco (Kovensky)" Date: Wed, 17 Jul 2013 17:56:42 -0300 Subject: [PATCH] misc: Make String() and Format() not pointer methods --- misc/episode.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/episode.go b/misc/episode.go index fee19d8..920ae93 100644 --- a/misc/episode.go +++ b/misc/episode.go @@ -86,7 +86,7 @@ func scale(i int) int { } // Converts the Episode into AniDB API episode format. -func (ep *Episode) String() string { +func (ep Episode) String() string { return ep.Format(1) } @@ -129,7 +129,7 @@ func (ep *Episode) ContainsEpisodes(ec EpisodeContainer) bool { return false } -func (ep *Episode) Format(width int) string { +func (ep Episode) Format(width int) string { if ep.Part < 0 { // whole episode return fmt.Sprintf("%s%0"+strconv.Itoa(width)+"d", ep.Type, ep.Number) } -- 2.44.0