-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tweak: move private methods from podcast.go to respected usage files #10
Comments
#12: To make sure a custom function implements the correct signature, I created function types for theses functions. By that you can require a |
* close #10 * remove exported function types * remove parseDateRFC1123Z function type
* Correct count len of UTF8 strings (#9) * Correctly count len of UTF8 strings (fix panics) * Sort header * Fixes Panics * Will implement duration parser (#8) * Implement duration parser * Fix example * Increase coverage to 100% * Fix Github and GoDocs Markdown (#14) * GH Markdown fixes * Updated format for godoc * Move podcast.go Private Methods to Respected Files (#12) * close #10 * remove exported function types * remove parseDateRFC1123Z function type * Allow providing GUID on Podcast (#15) * Allow providing own GUID * Check length instead of comparing to empty string * Adding test for user supplied GUID * Remove coveralls token Co-authored-by: Maksym Pavlenko <makpav@amazon.com> Co-authored-by: Konstantin Chukhlomin <mail@chuhlomin.com> Co-authored-by: iwittkau <iwittkau@users.noreply.github.com> Co-authored-by: Damian Szeluga <damian.szeluga@gmail.com>
* Catching Develop up to Master (#17) * Correct count len of UTF8 strings (#9) * Correctly count len of UTF8 strings (fix panics) * Sort header * Fixes Panics * Will implement duration parser (#8) * Implement duration parser * Fix example * Increase coverage to 100% * Fix Github and GoDocs Markdown (#14) * GH Markdown fixes * Updated format for godoc * Move podcast.go Private Methods to Respected Files (#12) * close #10 * remove exported function types * remove parseDateRFC1123Z function type * Allow providing GUID on Podcast (#15) * Allow providing own GUID * Check length instead of comparing to empty string * Adding test for user supplied GUID * Remove coveralls token Co-authored-by: Maksym Pavlenko <makpav@amazon.com> Co-authored-by: Konstantin Chukhlomin <mail@chuhlomin.com> Co-authored-by: iwittkau <iwittkau@users.noreply.github.com> Co-authored-by: Damian Szeluga <damian.szeluga@gmail.com> * Update doc.go for release notes * Update README for Release Co-authored-by: Jader Brasil <jaderebrasil@gmail.com> Co-authored-by: Maksym Pavlenko <makpav@amazon.com> Co-authored-by: Konstantin Chukhlomin <mail@chuhlomin.com> Co-authored-by: iwittkau <iwittkau@users.noreply.github.com> Co-authored-by: Damian Szeluga <damian.szeluga@gmail.com>
When I originally write
podcast.go
, everything was in that one file.As I started to add more and more functionality, it started to make sense to break out that extra functionality to dedicated files. E.g.
item.go
.However, I forgot to move the required private methods used in such files from
podcast.go
out to their usage.Example:
var parseDuration = func(duration int64) string
needs to be moved to where it is being used,item.go
.Off Topic: You may be wondering why I use
var parseDuration = func(duration int64) string
to define my functions, instead offunc parseDuration(duration int64) string
. The reason is because of testability. By assigning it to a variable, it allows me to assign custom functionality during tests - e.g. to purposely break or purposely cause an invalid result - to see how the caller would react.The text was updated successfully, but these errors were encountered: