util

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatMillis

func FormatMillis(millis int64) string

FormatMillis formats milliseconds since epoch in a human-readable way.

func FormatTime

func FormatTime(t time.Time) string

FormatTime formats a time in a human-readable way.

func MillisToTime

func MillisToTime(millis int64) time.Time

MillisToTime converts milliseconds since Unix epoch to time.Time.

func NowMillis

func NowMillis() int64

NowMillis returns the current time in milliseconds since Unix epoch.

func Slugify

func Slugify(s string) string

Slugify converts a string to a URL-friendly slug. - Converts to lowercase - Normalizes unicode (removes accents) - Replaces spaces and special characters with hyphens - Removes leading/trailing hyphens - Truncates to maxSlugLength chars without cutting mid-word

Types

This section is empty.

Jump to

Keyboard shortcuts

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