Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
time: want Time.Format variant to not generate garbage #5192
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.
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