Home / Function/ contextRecordFrom() — fiber Function Reference

contextRecordFrom() — fiber Function Reference

Architecture documentation for the contextRecordFrom() function in cache_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  98a2aeb3_c06c_4f20_47cb_9d3765ef8722["contextRecordFrom()"]
  8453a087_9678_fe96_1b20_2d125b6f8656["cache_test.go"]
  98a2aeb3_c06c_4f20_47cb_9d3765ef8722 -->|defined in| 8453a087_9678_fe96_1b20_2d125b6f8656
  style 98a2aeb3_c06c_4f20_47cb_9d3765ef8722 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

middleware/cache/cache_test.go lines 182–191

func contextRecordFrom(ctx context.Context, key string) contextRecord {
	record := contextRecord{
		key:      key,
		canceled: errors.Is(ctx.Err(), context.Canceled),
	}
	if value, ok := ctx.Value(markerKey).(string); ok {
		record.value = value
	}
	return record
}

Subdomains

Frequently Asked Questions

What does contextRecordFrom() do?
contextRecordFrom() is a function in the fiber codebase, defined in middleware/cache/cache_test.go.
Where is contextRecordFrom() defined?
contextRecordFrom() is defined in middleware/cache/cache_test.go at line 182.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free