-
Notifications
You must be signed in to change notification settings - Fork 7
Clean serialize.go #84
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
Conversation
signatures.go
Outdated
"golang.org/x/mod/sumdb/note" | ||
|
||
ct "github.com/google/certificate-transparency-go" | ||
) | ||
|
||
const millisPerNano int64 = 1000 * 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't there approximately zero milliseconds per nanosecond, did you mean nanosPerMilli
? :)
If so, could this be ... = time.Millisecond / time.Nanosecond
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe! This is not new code, I'm blindly migrating it from structures.go. Fixed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(did you mean to also export it?)
ca22230
to
9e9103b
Compare
signatures.go
Outdated
"golang.org/x/mod/sumdb/note" | ||
|
||
ct "github.com/google/certificate-transparency-go" | ||
) | ||
|
||
const NanosPerMilli int64 = int64(time.Millisecond / time.Nanosecond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to export it BTW?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woopsie, thanks. As a general comment, the repo needs a good clean-up of exported / unexported stuff as well. I don't want to do this straight away though first I'll re-organize and simplify the code, then I'll carve a few things into an internal/ directory, and then export / unexport accordingly.
Towards #5
This PR cleans serialize.go: dedup related code moves to dedup.go. Since the remaining code is signature related, we can then rename serialize.go to signatures.go, and move