time

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SecondsToExpirationDate

func SecondsToExpirationDate(now time.Time, seconds int) time.Time

SecondsToExpirationDate returns the expiration date from now plus the given number of seconds.

func TTLToSeconds

func TTLToSeconds(ttl string) (int, error)

TTLToSeconds converts a TTL string to seconds. The TTL string is a number followed by a unit: - y: years - mo: months - d: days - any other unit supported by time.ParseDuration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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