Conversion of unit library for golang
go get -u github.com/martinlindhe/unit
ft := 1 * unit.Feet
fmt.Println("1 feet in meters = ", ft.Meters())
Please note the resulting precision is limited to the float64 type. A version of this lib using big decimal numbers would be welcome, when golang/issues/12127 has been resolved.
Cannot be used to scale directly like the other units. Instead, use the From* functions to create a Temperature type:
f := unit.FromFahrenheit(100)
fmt.Println("100 fahrenheit in celsius = ", f.Celsius())
Under MIT