Skip to content
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

Correctly count len of UTF8 strings (fix panics) #9

Merged
merged 2 commits into from
Dec 10, 2017
Merged

Correctly count len of UTF8 strings (fix panics) #9

merged 2 commits into from
Dec 10, 2017

Conversation

mxpv
Copy link
Contributor

@mxpv mxpv commented Aug 23, 2017

In current implementation AddSubTitle panics for strings like U17.com - 有妖氣官方頻道丨《鎮魂街》熱血來襲!每週四精彩更新!. This is because len returns the length of string in bytes instead of length in runes (runes = 33, len in bytes > 64), which cases invalid slice range and panics.

@eduncan911 can you review pls?

Copy link
Owner

@eduncan911 eduncan911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this!

The C.I. has an issue with forks. But as long as the code coverage remains 100%, which it does:

PASS
coverage: 100.0% of statements

Then I'm cool. 👍

@eduncan911
Copy link
Owner

And sorry for the delay. I didn't see the notification for this.

@eduncan911 eduncan911 merged commit f14c4d7 into eduncan911:master Dec 10, 2017
@eduncan911
Copy link
Owner

In the future, let's branch and PR against Develop branch. 👍

eduncan911 pushed a commit that referenced this pull request Feb 4, 2020
* 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>
@eduncan911 eduncan911 mentioned this pull request Feb 4, 2020
eduncan911 added a commit that referenced this pull request Feb 5, 2020
* 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>
eduncan911 added a commit that referenced this pull request Feb 7, 2020
# This is the 1st commit message:

Go Mod and Vendor

# This is the commit message #2:

asd

# This is the commit message #3:

asd

# This is the commit message #4:

asd

# This is the commit message #5:

asd

# This is the commit message #6:

asd

# This is the commit message #7:

asd

# This is the commit message #8:

asd

# This is the commit message #9:

asd
bestony referenced this pull request in bestony/podcast Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants