MCPcopy
hub / github.com/flyteorg/flyte / addStringFieldWithDefaults

Function addStringFieldWithDefaults

flytestdlib/contextutils/context.go:169–176  ·  view source on GitHub ↗
(ctx context.Context, m map[string]string, fieldKey Key)

Source from the content-addressed store, hash-verified

167}
168
169func addStringFieldWithDefaults(ctx context.Context, m map[string]string, fieldKey Key) {
170 val := ctx.Value(fieldKey)
171 if val == nil {
172 val = ""
173 }
174
175 m[fieldKey.String()] = val.(string)
176}
177
178// GetLogFields gets a map of all known logKeys set on the context. logKeys are special and should be used in case,
179// context fields are to be added to the log lines.

Callers 1

ValuesFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected