templatehelpers

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidValue = "N/A"

Variables

This section is empty.

Functions

func BoolToCheckbox

func BoolToCheckbox(b bool) template.HTML

func BoolToHTML

func BoolToHTML(b bool) template.HTML

func CountryCodeToFlag

func CountryCodeToFlag(cc string) string

func HumanDistanceFor added in v0.12.0

func HumanDistanceFor(unit string) func(float64) string

func HumanDistanceKM added in v0.12.0

func HumanDistanceKM(d float64) string

func HumanDistanceMile added in v0.12.0

func HumanDistanceMile(d float64) string

func HumanDuration

func HumanDuration(d time.Duration) string

func HumanElevationFor added in v0.12.0

func HumanElevationFor(unit string) func(float64) string

func HumanElevationFt added in v0.12.0

func HumanElevationFt(m float64) string

func HumanElevationM added in v0.12.0

func HumanElevationM(m float64) string

func HumanSpeedFor added in v0.12.0

func HumanSpeedFor(unit string) func(float64) string

func HumanSpeedKPH added in v0.12.0

func HumanSpeedKPH(mps float64) string

func HumanSpeedMilePH added in v0.12.0

func HumanSpeedMilePH(mps float64) string

func HumanTempoFor added in v0.12.0

func HumanTempoFor(unit string) func(float64) string

func HumanTempoKM added in v0.12.0

func HumanTempoKM(mps float64) string

func HumanTempoMile added in v0.12.0

func HumanTempoMile(mps float64) string

func IconFor

func IconFor(what string) template.HTML

func NumericDuration

func NumericDuration(d time.Duration) float64

func SelectIf added in v0.12.0

func SelectIf(v1, v2 string) template.HTML

Types

type DecoratedAttribute

type DecoratedAttribute struct {
	Icon  string
	Name  string
	Value interface{}
	Unit  string
}

func BuildDecoratedAttribute

func BuildDecoratedAttribute(icon, name string, value interface{}, unit string) DecoratedAttribute

type LanguageInformation

type LanguageInformation struct {
	Code        string
	EnglishName string
	LocalName   string
	Flag        string
}

func ToLanguageInformation

func ToLanguageInformation(code string) LanguageInformation

type TZ added in v0.10.0

type TZ struct {
	Name        string
	Description string
}

func Timezones added in v0.10.0

func Timezones() []TZ

Jump to

Keyboard shortcuts

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