util

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains added in v1.5.1

func Contains[T comparable](haystack []T, needle T) bool

Contains searches for `needle` in `haystack` and returns `true` if found.

func Days added in v0.8.0

func Days(d time.Duration) int

Days returns the number of days in a duration. Fraction of days are discarded.

func TimeFormat

func TimeFormat(t time.Time) string

TimeFormat formats the given time, where an empty time is formatted as "not set".

Types

This section is empty.

Jump to

Keyboard shortcuts

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