unit
unit copied to clipboard
Conversion of unit library for golang
Will hold this off until there is official big decimal support in golang. The issue is tracked at https://github.com/golang/go/issues/12127
All converted units with the exception of temperatures can be easily converted using multiply, like this: `in := (Meter * 5).Inches()` It would be nice if temperature could too be...
It's not quite as clean as it would be in some languages since Go doesn't let you attach extension methods to existing types, but this seems easier than the `int`...
It would make sense to generate this code from some tables. See https://blog.golang.org/generate