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
unit: remove explicitly prefixed constants #950
Conversation
unit/generate_unit.go
Outdated
Receiver string | ||
Offset int // From normal (for example, mass base unit is kg, not kg) | ||
PowerOffset int // From normal (for example, mass base unit is kg, not kg) |
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.
is kg, not kg?
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.
Ha!
Fixed
unit/generate_unit.go
Outdated
DimensionName: "Area", | ||
Receiver: "a", | ||
PrintString: "m^2", | ||
TypeComment: "Area represents and area in square metres", |
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.
an area
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.
Fixed
PTAL |
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.
I approve it but cannot tell whether you should wait for @btracey or not, I haven't been paying much attention to unit
.
I'll wait. |
That's such an obvious solution to the Kg problem ... can't believe I didn't think of that. |
Which part, the extra constant or the 1e-3? |
Setting the gram to be 1e-3. |
When you remove all the constants, that's what was left. It seemed obvious. |
I agree, it does seem obvious |
Please take a look.
Closes #90.