util

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRangeStr

func ParseRangeStr(rangeStr string) (map[int]struct{}, error)

ParseRangeStr parses range strings like "1-2" or "3,5-6".

func ParseTimeOrDuration added in v0.0.2

func ParseTimeOrDuration(input string, now time.Time) (time.Time, error)

ParseTimeOrDuration converts an input string into a time. It first tries parsing it as an RFC3339 timestamp and then if that fails as a duration (relative to now).

Types

This section is empty.

Jump to

Keyboard shortcuts

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