MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / durationFromMetadata

Function durationFromMetadata

sdk/cliproxy/auth/conductor.go:5383–5395  ·  view source on GitHub ↗
(meta map[string]any, keys ...string)

Source from the content-addressed store, hash-verified

5381}
5382
5383func durationFromMetadata(meta map[string]any, keys ...string) time.Duration {
5384 if len(meta) == 0 {
5385 return 0
5386 }
5387 for _, key := range keys {
5388 if val, ok := meta[key]; ok {
5389 if dur := parseDurationValue(val); dur > 0 {
5390 return dur
5391 }
5392 }
5393 }
5394 return 0
5395}
5396
5397func durationFromAttributes(attrs map[string]string, keys ...string) time.Duration {
5398 if len(attrs) == 0 {

Callers 1

authPreferredIntervalFunction · 0.85

Calls 1

parseDurationValueFunction · 0.85

Tested by

no test coverage detected