This library is designed to provide safe conversions of units; each unit has a unique type T to prevent accidental unit mis-conversion.
Pull requests are very welcome; please follow the structure and ensure you provide tests for new conversions.
package main
import (
"fmt"
"github.com/davidjpeacock/conversions"
)
func main() {
t := (30)
psi := conversions.Psi(t)
fmt.Printf("%s = %s\n", psi, conversions.PsiToBar(psi))
}[peacock@trashcan psitobar]$ ./psitobar
30psi = 2.068428bar