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

Function auditMap

enterprise/audit/table.go:478–487  ·  view source on GitHub ↗

auditMap converts a map of struct pointers to a map of struct names as strings. It's a convenience wrapper so that structs can be passed in by value instead of manually typing struct names as strings.

(m map[any]map[string]Action)

Source from the content-addressed store, hash-verified

476// strings. It's a convenience wrapper so that structs can be passed in by value
477// instead of manually typing struct names as strings.
478func auditMap(m map[any]map[string]Action) Table {
479 out := make(Table, len(m))
480
481 for k, v := range m {
482 tableKey, tableValue := entry(k, v)
483 out[tableKey] = tableValue
484 }
485
486 return out
487}
488
489// entry is a helper function that checks the json tags to make sure all fields
490// are tracked. And no excess fields are tracked.

Callers 2

table.goFile · 0.85
Test_diffValuesFunction · 0.85

Calls 1

entryFunction · 0.70

Tested by 1

Test_diffValuesFunction · 0.68