weight

package
v1.35.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Units = []Unit{Pound, Ounce, Kilogram, Gram}

Functions

This section is empty.

Types

type Mass

type Mass float64

func Convert

func Convert(mass Mass, from, to Unit) Mass

func (Mass) String

func (m Mass) String() string

type Unit

type Unit string
const (
	Pound    Unit = "lb"
	Ounce    Unit = "oz"
	Kilogram Unit = "kg"
	Gram     Unit = "g"
)

func (Unit) Name

func (u Unit) Name() string

Print nice names

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL