MCPcopy Index your code
hub / github.com/subtrace/subtrace / setLocked

Method setLocked

event/event.go:64–76  ·  view source on GitHub ↗
(key string, val string)

Source from the content-addressed store, hash-verified

62}
63
64func (ev *Event) setLocked(key string, val string) {
65 if ev.vals == nil {
66 ev.vals = make(map[string]string)
67 }
68
69 if _, ok := ev.vals[key]; ok {
70 ev.vals[key] = val
71 return
72 }
73
74 ev.keys = append(ev.keys, key)
75 ev.vals[key] = val
76}
77
78func (ev *Event) Get(key string) string {
79 ev.mu.RLock()

Callers 2

CopyFromMethod · 0.95
SetMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected