-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use int type for SizeInBytes in file summary response #13
Conversation
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.
Use int64
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.
Bonus points if you use unint, as you can't have negative bytes
Using |
@@ -121,7 +121,7 @@ type FileSummaryResponse struct { | |||
Description string `json:"description,omitempty"` | |||
Labels []string `json:"labels,omitempty"` | |||
Name string `json:"name"` | |||
SizeInBytes string `json:"sizeInBytes,omitempty"` | |||
SizeInBytes uint `json:"sizeInBytes,omitempty"` |
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.
uint64
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.
@jmoney Given my response above about portability, what's the upside of uint64
over uint
? Also, what's our cap on dataset size? It's gotta be less than 2^64 bytes, yeah? 😁
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.
totally. just going with patterns. when you work in bytes typically you use 64bits. most libs accept 64bits for number of bytes and you'd do some weird conversions to get it there.
however you are right on portability, and the lib using 64bits is purely anecdotal so i rescind my request for 64 bits
90ce3ce
to
3b17f4a
Compare
I was too cool, and rebased instead of merging. 😑 |
Closes #11