MCPcopy Create free account
hub / github.com/flyteorg/flyte / addFieldIfNotNil

Function addFieldIfNotNil

flytestdlib/contextutils/context.go:162–167  ·  view source on GitHub ↗
(ctx context.Context, m map[string]interface{}, fieldKey Key)

Source from the content-addressed store, hash-verified

160}
161
162func addFieldIfNotNil(ctx context.Context, m map[string]interface{}, fieldKey Key) {
163 val := ctx.Value(fieldKey)
164 if val != nil {
165 m[fieldKey.String()] = val
166 }
167}
168
169func addStringFieldWithDefaults(ctx context.Context, m map[string]string, fieldKey Key) {
170 val := ctx.Value(fieldKey)

Callers 1

GetLogFieldsFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected