Home / Function/ Header() — gin Function Reference

Header() — gin Function Reference

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

Function go CoreEngine Context calls 1 called by 1

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

context.go lines 1079–1085

func (c *Context) Header(key, value string) {
	if value == "" {
		c.Writer.Header().Del(key)
		return
	}
	c.Writer.Header().Set(key, value)
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free