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

Fixed truncation issue #77

Merged
merged 1 commit into from
Oct 5, 2022
Merged

Conversation

Aym3nTN
Copy link
Contributor

@Aym3nTN Aym3nTN commented Oct 5, 2022

#76
"
When trying to truncate a string with a value greater than its size, we get the below error.

Example of failed test: {"DOBROSLAWZYBORT", 17, "dobroslawzybort", false}

--- FAIL: TestSlugMakeSmartTruncate (0.01s)
panic: runtime error: slice bounds out of range [:17] with length 15 [recovered]
	panic: runtime error: slice bounds out of range [:17] with length 15

"

@codecov
Copy link

codecov bot commented Oct 5, 2022

Codecov Report

Merging #77 (d046b02) into master (e79300e) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #77   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          142       142           
=========================================
  Hits           142       142           
Impacted Files Coverage Δ
slug.go 100.00% <100.00%> (ø)

@matrixik matrixik added the bug label Oct 5, 2022
@matrixik
Copy link
Member

matrixik commented Oct 5, 2022

And here I though that I added enough new test cases.
Thank you for finding and fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants