Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-19 Thread peterGo
Vasiliy Tolstov, "I need to output strings with format MMDDHHMMSSMILLISEC without dot in string. But Go able to output milliseconds only in case of .000" ... "that works with many messages and want to avoid additional memory allocations" The Go standard library does not pretend to provide e

Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-18 Thread Vasiliy Tolstov
пт, 17 июл. 2020 г. в 05:40, Justin Israel : > > > > On Friday, July 17, 2020 at 11:21:32 AM UTC+12 va...@selfip.ru wrote: >> >> вт, 14 июл. 2020 г. в 18:39, Jake Montgomery : >> > >> > I agree, it seems like an unfortunate oversight. You can do it without the >> > slice tricks: https://play.golan

Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-16 Thread Justin Israel
On Friday, July 17, 2020 at 11:21:32 AM UTC+12 va...@selfip.ru wrote: > вт, 14 июл. 2020 г. в 18:39, Jake Montgomery : > > > > 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 Sprin

Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-16 Thread Vasiliy Tolstov
вт, 14 июл. 2020 г. в 18:39, Jake Montgomery : > > 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

Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-14 Thread Jake Montgomery
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. On Tuesday, July 14, 2020 at 8:40:18 AM UTC-4, Vasiliy Tolstov wrote: > > вт, 14 июл. 2020 г. в 15:17, Jake Montgomery >: >

Re: [go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-14 Thread Vasiliy Tolstov
вт, 14 июл. 2020 г. в 15:17, Jake Montgomery : > > Why not just remove the dot? You know where it is: > https://play.golang.org/p/ZHqHTOeA7HQ > Perhaps there is a better way, but this seems to work. > Yes, thanks. My question mostly - why format time to some intermediate string that needs to be p

[go-nuts] Re: golang time.Now().Format with milliseconds without dot in string

2020-07-14 Thread Jake Montgomery
Why not just remove the dot? You know where it is: https://play.golang.org/p/ZHqHTOeA7HQ Perhaps there is a better way, but this seems to work. On Tuesday, July 14, 2020 at 7:00:02 AM UTC-4, Vasiliy Tolstov wrote: > > Hi! I'm read several times godoc about the time package but have now > way to