thirdparties

package
v0.56.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeLayouts = []string{
	time.RFC3339,
	"2006-01-02T15:04:05",
	time.RFC1123Z,
	time.RFC1123,
	time.RFC822Z,
	time.RFC822,
	time.RFC850,
	time.ANSIC,
	time.UnixDate,
	time.RubyDate,
	"2006-01-02 15:04:05.999999999 -0700 MST",
	"2006-01-02",
	"02 Jan 2006",
	"2006-01-02T15:04:05-0700",
	"2006-01-02 15:04:05 -07:00",
	"2006-01-02 15:04:05 -0700",
	"2006-01-02 15:04:05Z07:00",
	"2006-01-02 15:04:05Z0700",
	"2006-01-02 15:04:05",
	time.Kitchen,
	time.Stamp,
	time.StampMilli,
	time.StampMicro,
	time.StampNano,
}

TimeLayouts contains predefined layouts used by the ParseTime function.

This list of layouts is the same used by Hugo's time function. It is copyright 2017 The Hugo Authors and licensed under the Apache license. See https://github.com/gohugoio/hugo/blob/master/tpl/time/time.go.

Functions

func ApproximateFloatToString

func ApproximateFloatToString(f *big.Float) string

ApproximateFloatToString returns a decimal approximation of the Float value.

func Compare

func Compare(aVal, bVal reflect.Value) int

Compare compares two values of the same type. It returns -1, 0, 1 according to whether a > b (1), a == b (0), or a < b (-1). If the types differ, it returns -1. See the comment on Sort for the comparison rules.

Types

This section is empty.

Jump to

Keyboard shortcuts

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