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

cmd/lncli: remove usage of Millisecond() for Go 1.12 #4253

Merged
merged 1 commit into from May 8, 2020

Conversation

Roasbeef
Copy link
Member

@Roasbeef Roasbeef commented May 6, 2020

The new table format for the pay command started to use the
Millisecond() method on time.Duration. However, this method was only
added in Go 1.13, so this breaks the build for Go 1.12. We replace this
by manual division. time.Duration "natively" is in nanoseconds, so we
covert to milli seconds by dividing my time.Millisecond, which is
1,000,000.

The new table format for the pay command started to use the
`Millisecond()` method on `time.Duration`. However, this method was only
added in Go 1.13, so this breaks the build for Go 1.12. We replace this
by manual division. `time.Duration` "natively" is in nanoseconds, so we
covert to milli seconds by dividing my `time.Millisecond`, which is
1,000,000.
@Roasbeef Roasbeef added this to the 0.10.1 milestone May 6, 2020
Copy link
Contributor

@cfromknecht cfromknecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch LGTM

@Roasbeef Roasbeef merged commit db7eac3 into lightningnetwork:master May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants