]> git.lizzy.rs Git - go-anidb.git/commitdiff
misc: Make String() and Format() not pointer methods
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Wed, 17 Jul 2013 20:56:42 +0000 (17:56 -0300)
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>
Wed, 17 Jul 2013 20:56:42 +0000 (17:56 -0300)
misc/episode.go

index fee19d8ba920647955fb121ca4c5d0da2f22a094..920ae93c8481a6cfea1f37be1031e4c0b30d4f2c 100644 (file)
@@ -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)
        }