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

time: want Time.Format variant to not generate garbage #5192

Closed
bradfitz opened this issue Apr 3, 2013 · 11 comments
Closed

time: want Time.Format variant to not generate garbage #5192

bradfitz opened this issue Apr 3, 2013 · 11 comments

Comments

@bradfitz
Copy link
Contributor

bradfitz commented Apr 3, 2013

I want a version of time.Format that can either append to a []byte (like
http://golang.org/pkg/strconv/#AppendInt and friends) or write to an io.ByteWriter.

Generating the Date headers in the HTTP server is one of a dozen remaining sources of
garbage. I don't want a string.
@bradfitz
Copy link
Contributor Author

bradfitz commented Apr 3, 2013

Comment 2:

Labels changed: added performance.

@bradfitz
Copy link
Contributor Author

bradfitz commented Apr 3, 2013

Comment 3:

Labels changed: removed optimization.

@bradfitz
Copy link
Contributor Author

bradfitz commented Apr 8, 2013

Comment 4:

For after Go 1.1: https://golang.org/cl/8478044

Status changed to Started.

@bradfitz
Copy link
Contributor Author

Comment 6:

Labels changed: added garbage.

@bradfitz
Copy link
Contributor Author

Comment 7:

This issue was closed by revision 0af302f.

Status changed to Fixed.

@bradfitz
Copy link
Contributor Author

Comment 8:

This issue was closed by revision 509a117.

@cespare
Copy link
Contributor

cespare commented Aug 25, 2014

Comment 9:

0d28fd55e721 was rolled back due to disagreement on
https://golang.org/cl/8478044.
Can we reopen this ticket? Should I open a new one?
Would it be productive for me to submit a new CL with the naming and parameter args
discussed in codereview? That is:
func (t Time) AppendFormat(dst []byte, layout string) []byte

@robpike
Copy link
Contributor

robpike commented Aug 25, 2014

Comment 10:

Unfixed, reopening ticket.
cespare: SGTM

Status changed to Accepted.

@cespare
Copy link
Contributor

cespare commented Sep 3, 2014

Comment 11:

Didn't see this until just now.
I've prepared https://golang.org/cl/133530044 which I guess I'll mail once the
tree reopens in a few months.

@griesemer
Copy link
Contributor

Comment 12:

Labels changed: added repo-main.

@cespare
Copy link
Contributor

cespare commented Dec 18, 2014

I recreated that CL in Gerrit and mailed as https://golang.org/cl/1760.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@mikioh mikioh modified the milestones: Go1.5, Unplanned Apr 12, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants