Home / Function/ Set() — gin Function Reference

Set() — gin Function Reference

Architecture documentation for the Set() function in context.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  6e9cb785_6d47_c8a3_8dee_973da7d71486["Set()"]
  2083ec18_369e_5122_2c7b_57a02900a1d8["ShouldBindBodyWith()"]
  2083ec18_369e_5122_2c7b_57a02900a1d8 -->|calls| 6e9cb785_6d47_c8a3_8dee_973da7d71486
  8bbfb136_f6d5_6a2a_941a_8150c630a768["Header()"]
  8bbfb136_f6d5_6a2a_941a_8150c630a768 -->|calls| 6e9cb785_6d47_c8a3_8dee_973da7d71486
  7d22664f_979d_d3fb_6d41_502be0428615["FileAttachment()"]
  7d22664f_979d_d3fb_6d41_502be0428615 -->|calls| 6e9cb785_6d47_c8a3_8dee_973da7d71486
  style 6e9cb785_6d47_c8a3_8dee_973da7d71486 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

context.go lines 276–284

func (c *Context) Set(key any, value any) {
	c.mu.Lock()
	defer c.mu.Unlock()
	if c.Keys == nil {
		c.Keys = make(map[any]any)
	}

	c.Keys[key] = value
}

Domain

Subdomains

Frequently Asked Questions

What does Set() do?
Set() is a function in the gin codebase.
What calls Set()?
Set() is called by 3 function(s): FileAttachment, Header, ShouldBindBodyWith.

Analyze Your Own Codebase

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

Try Supermodel Free