From: Diogo Franco (Kovensky) Date: Wed, 17 Jul 2013 20:53:31 +0000 (-0300) Subject: misc: Rename (Episode).(Inc|Dec) to (Episode).(IncPart|DecPart) X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=62c7496d45890306e6e66bd764ee0aa0119e57f9;p=go-anidb.git misc: Rename (Episode).(Inc|Dec) to (Episode).(IncPart|DecPart) --- diff --git a/misc/episode.go b/misc/episode.go index 1dbd172..c5d41a8 100644 --- a/misc/episode.go +++ b/misc/episode.go @@ -134,7 +134,7 @@ func (ep *Episode) FormatLog(max int) string { return ep.Format(scale(max)) } -func (ep *Episode) Inc() { +func (ep *Episode) IncPart() { if ep.Parts > 0 && ep.Part == ep.Parts-1 { ep.IncNumber() } else { @@ -148,7 +148,7 @@ func (ep *Episode) IncNumber() { ep.Number++ } -func (ep *Episode) Dec() { +func (ep *Episode) DecPart() { if ep.Part > 0 { ep.Part-- } else { diff --git a/misc/episoderange.go b/misc/episoderange.go index 8f679b1..7e750cc 100644 --- a/misc/episoderange.go +++ b/misc/episoderange.go @@ -217,7 +217,7 @@ func (er *EpisodeRange) Split(ep *Episode) []*EpisodeRange { return []*EpisodeRange{nil, nil} case a.ContainsEpisodes(ep): if ep.Part >= 0 { - a.Inc() + a.IncPart() } else { a.IncNumber() } @@ -233,7 +233,7 @@ func (er *EpisodeRange) Split(ep *Episode) []*EpisodeRange { return []*EpisodeRange{nil, r.Simplify()} case b.ContainsEpisodes(ep): if ep.Part >= 0 { - b.Dec() + b.DecPart() } else { b.DecNumber() }