Skip to content

jafine/conversions

Repository files navigation

Conversion formulas in Golang

Build Status GoDoc Go Report Card License

This library is designed to provide safe conversions of units; each unit has a unique type T to prevent accidental unit mis-conversion.

Contributing

Pull requests are very welcome; please follow the structure and ensure you provide tests for new conversions.

Usage

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))
}

Output

[peacock@trashcan psitobar]$ ./psitobar
30psi = 2.068428bar

About

Conversion formulas in Golang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages