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

Function BackgroundTaskFieldsBytes

coderd/audit/fields.go:24–34  ·  view source on GitHub ↗
(ctx context.Context, logger slog.Logger, subsystem BackgroundSubsystem)

Source from the content-addressed store, hash-verified

22}
23
24func BackgroundTaskFieldsBytes(ctx context.Context, logger slog.Logger, subsystem BackgroundSubsystem) []byte {
25 af := BackgroundTaskFields(subsystem)
26
27 wriBytes, err := json.Marshal(af)
28 if err != nil {
29 logger.Error(ctx, "marshal additional fields for background audit", slog.Error(err))
30 return []byte("{}")
31 }
32
33 return wriBytes
34}

Callers 3

ActivateDormantUserFunction · 0.92

Calls 3

BackgroundTaskFieldsFunction · 0.85
MarshalMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected