On Friday, July 17, 2020 at 11:21:32 AM UTC+12 va...@selfip.ru wrote:
> вт, 14 июл. 2020 г. в 18:39, Jake Montgomery <jake...@gmail.com>: > > > > I agree, it seems like an unfortunate oversight. You can do it without > the slice tricks: https://play.golang.org/p/tNAPOcQqApN > > It does take an additional Sprintf() though. > > > > Thanks, looks good. But i think for go devs adding additional format > that can be used to specify milli/micro/nano seconds will be easy. > > -- > Vasiliy Tolstov, > e-mail: v.to...@selfip.ru > I asked the same question on reddit about a month ago, where I needed to match an existing timestamp format: https://www.reddit.com/r/golang/comments/gr7hz9/string_formatting_a_timetime_with_custom/ Seems string formatting was the best option available to me. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/5b132613-5be4-4062-8092-5e0cfa92a7d6n%40googlegroups.com.