tempconv

package
v0.0.0-...-94c99f4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Add support for Kelvin temperatures to `tempFlag`.

Explain why the help message contains °C when the default value of `20.0` does not. It uses the `String()` method declared in `tempconv` func (c Celsius) String() string { return fmt.Sprintf("%g°C", c) }

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Celsius

type Celsius float64

func CelsiusFlag

func CelsiusFlag(name string, value Celsius, usage string) *Celsius

CelsiusFlag defines a Celsius flag with the specified name, default value, and usage, and returns the address of the flag variable. The flag argument must have a quantity and a unit, e.g., "100C".

func FToC

func FToC(f Fahrenheit) Celsius

func KToC

func KToC(k Kelvin) Celsius

func (Celsius) String

func (c Celsius) String() string

type Fahrenheit

type Fahrenheit float64

func CToF

func CToF(c Celsius) Fahrenheit

type Kelvin

type Kelvin float64

Jump to

Keyboard shortcuts

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