Skip to content

Named Types

Named types can be used to differ between multiple incompatible types with the same underlying type.

// Declaration
type name underlyingType

// Example
type Celsius float64
type Fahrenheit float64