utils

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDateTime

func ParseDateTime(s string) (_time.Time, error)

func ParseDuration

func ParseDuration(s string) (_time.Duration, error)

Only supports minutes, hours, and days

func Pluralize

func Pluralize(count int64, singular string) string

func Relative

func Relative(seconds int64) string

Types

type InternalError

type InternalError struct {
	Message string
}

func NewInternalError

func NewInternalError(message string) *InternalError

func (*InternalError) Error

func (e *InternalError) Error() string

type Time

type Time interface {
	Now() _time.Time
}

func NewTime

func NewTime() Time

Jump to

Keyboard shortcuts

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