Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/segmentio/encoding
/ duration
TypeAlias
duration
json/json_test.go:718–718 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
716
}
717
718
type
duration time.Duration
719
720
func
(d duration) MarshalJSON() ([]byte, error) {
721
return
[]byte(`
"` + time.Duration(d).String() + `"
`), nil
Callers
3
BenchmarkUnmarshal
Function · 0.85
UnmarshalJSON
Method · 0.85
json_test.go
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected