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

sqlite3: save an alloc during bind by using time.Time.AppendFormat #1157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

charlievieth
Copy link
Contributor

This commit changes bind() to use time.Time.AppendFormat, which returns a byte slice, instead of time.Time.Format, which returns a string that must then be converted to a byte slice. This should save an allocation.

This commit changes bind() to use time.Time.AppendFormat, which returns
a byte slice, instead of time.Time.Format, which returns a string that
must then be converted to a byte slice. This should save an allocation.
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.03 🎉

Comparison is base (edc3bb6) 46.72% compared to head (1ae8430) 46.75%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1157      +/-   ##
==========================================
+ Coverage   46.72%   46.75%   +0.03%     
==========================================
  Files          12       12              
  Lines        1526     1527       +1     
==========================================
+ Hits          713      714       +1     
  Misses        671      671              
  Partials      142      142              
Impacted Files Coverage Δ
sqlite3.go 52.91% <100.00%> (+0.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@dolmen
Copy link
Contributor

dolmen commented Oct 17, 2023

Note: time.Time.AppendFormat has been added with Go 1.5.

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.

None yet

3 participants