Registry / utility / xhit-go-str2duration

xhit-go-str2duration

JSON →
library1.2.0gogounverified

A Go library for parsing human-readable duration strings into time.Duration.

go get github.com/xhit/go-str2duration
INSTALL
IMPORT
SIG · XHIT-GO-STR2DURATI
X
xhit-go-str2duration
utilitygov1.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

str2duration
github.com/xhit/go-str2duration

Parse a duration string like '1h30m' into time.Duration

package main import ( "fmt" "github.com/xhit/go-str2duration" ) func main() { d, err := str2duration.Parse("1h30m") if err != nil { panic(err) } fmt.Println(d) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.2.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
xhit-go-str2duration — go get xhit-go-str2duration · libregistry