On Tue, Jul 25, 2017 at 4:38 PM, yihao yang <yangyihao1...@gmail.com> wrote:
>
> I have some problems on break long code into lines when developing in
> golang.
> Could you please help me on how to break a long code as following?
> time.Sleep(time.Duration(*Int64Flag_xxxxxxxxxxxxxxIntervalMS) *
> time.Millisecond - time.Now().Sub(timeStart))

d := time.Duration(*Int64Flag_xxxxxxxxxxxxxxIntervalMS) * time.Millisecond
> time.Sleep(d - time.Now().Sub(timeStart))


or

time.Sleep(time.Duration(*Int64Flag_xxxxxxxxxxxxxxIntervalMS) *
> time.Millisecond - time.Now().Sub(timeStart))


or

time.Sleep(time.Duration(*Int64Flag_xxxxxxxxxxxxxxIntervalMS) *
> time.Millisecond -
> ime.Now().Sub(timeStart))


Ian

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to