strutil

package
v0.0.0-...-95bd64c Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DurationToString

func DurationToString(duration time.Duration) string

DurationToString formats a time.Duration as a string with the assumption that a year always has 365 days and a day always has 24h. (The former doesn't work in leap years, the latter is broken by DST switches, not to speak about leap seconds, but those are not even treated properly by the duration strings in the standard library.)

func GraphLinkForExpression

func GraphLinkForExpression(expr string) string

GraphLinkForExpression creates an escaped relative link to the graph view of the provided expression.

func StringToDuration

func StringToDuration(durationStr string) (duration time.Duration, err error)

StringToDuration parses a string into a time.Duration, assuming that a year always has 365d, a week 7d, a day 24h. See DurationToString for problems with that.

func TableLinkForExpression

func TableLinkForExpression(expr string) string

TableLinkForExpression creates an escaped relative link to the table view of the provided expression.

Types

This section is empty.

Jump to

Keyboard shortcuts

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