-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
perf: improve paragragh performance #35
perf: improve paragragh performance #35
Conversation
Signed-off-by: rfyiamcool <rfyiamcool@163.com>
lorem_test.go
Outdated
@@ -52,13 +52,15 @@ func TestFakeWord(t *testing.T) { | |||
|
|||
func TestFakeSentence(t *testing.T) { | |||
res := Sentence() | |||
fmt.Println(res) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove this print please
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
lorem_test.go
Outdated
if res == "" || !strings.HasSuffix(res, ".") { | ||
t.Error("Expected sentence") | ||
} | ||
} | ||
|
||
func TestFakeParagraph(t *testing.T) { | ||
res := Paragraph() | ||
fmt.Println(res) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove this please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During the test, the results were printed to see if they were as expected. When I submitted the PR, I forgot to delete it. 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove this please?
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like to use t.Log()
here.
Codecov ReportPatch coverage:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #35 +/- ##
==========================================
+ Coverage 89.04% 89.16% +0.11%
==========================================
Files 12 12
Lines 1762 1781 +19
==========================================
+ Hits 1569 1588 +19
Misses 138 138
Partials 55 55
☔ View full report in Codecov by Sentry. |
Signed-off-by: rfyiamcool <rfyiamcool@163.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
summary
improve paragragh performance.
before optimize
after optimize