MCPcopy Index your code
hub / github.com/coder/coder / unique

Function unique

coderd/autobuild/notify/notifier.go:123–133  ·  view source on GitHub ↗
(ds []time.Duration)

Source from the content-addressed store, hash-verified

121}
122
123func unique(ds []time.Duration) []time.Duration {
124 m := make(map[time.Duration]bool)
125 for _, d := range ds {
126 m[d] = true
127 }
128 var ks []time.Duration
129 for k := range m {
130 ks = append(ks, k)
131 }
132 return ks
133}

Callers 1

NewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected