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

fix: strings.Index panic #24

Merged
merged 1 commit into from
Oct 15, 2024
Merged

fix: strings.Index panic #24

merged 1 commit into from
Oct 15, 2024

Conversation

zostay
Copy link
Owner

@zostay zostay commented Oct 15, 2024

This pull request addresses a bug in the strings.Indent function and adds a corresponding test to ensure the fix works correctly.

Bug Fix:

  • strings/content.go: Fixed a bug in Indent that caused a panic if the input string was empty by adding a length check before accessing the first character.

Testing:

  • strings/content_test.go: Added a test case to TestIndent to verify that the Indent function returns an empty string when given an empty input string.

Documentation:

  • Changes.md: Documented the bug fix in the strings.Indent function.

@zostay zostay merged commit e6d7b20 into master Oct 15, 2024
1 check passed
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.

1 participant