MCPcopy Create free account
hub / github.com/coder/coder / getField

Function getField

agent/boundary_logs_test.go:26–33  ·  view source on GitHub ↗

getField returns the value of a field by name from a slog.Map.

(fields slog.Map, name string)

Source from the content-addressed store, hash-verified

24
25// getField returns the value of a field by name from a slog.Map.
26func getField(fields slog.Map, name string) interface{} {
27 for _, f := range fields {
28 if f.Name == name {
29 return f.Value
30 }
31 }
32 return nil
33}
34
35func sendBoundaryLogsRequest(t *testing.T, conn net.Conn, req *agentproto.ReportBoundaryLogsRequest) {
36 t.Helper()

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected