Copy() — gin Function Reference
Architecture documentation for the Copy() function in context.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD b7bb13ec_fb10_9a7e_dda5_be8151eae883["Copy()"] 7171cbc7_d4d0_2e8f_5359_84a576f3f791["SaveUploadedFile()"] 7171cbc7_d4d0_2e8f_5359_84a576f3f791 -->|calls| b7bb13ec_fb10_9a7e_dda5_be8151eae883 style b7bb13ec_fb10_9a7e_dda5_be8151eae883 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
context.go lines 122–145
func (c *Context) Copy() *Context {
cp := Context{
writermem: c.writermem,
Request: c.Request,
engine: c.engine,
}
cp.writermem.ResponseWriter = nil
cp.Writer = &cp.writermem
cp.index = abortIndex
cp.handlers = nil
cp.fullPath = c.fullPath
cKeys := c.Keys
c.mu.RLock()
cp.Keys = maps.Clone(cKeys)
c.mu.RUnlock()
cParams := c.Params
cp.Params = make([]Param, len(cParams))
copy(cp.Params, cParams)
return &cp
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does Copy() do?
Copy() is a function in the gin codebase.
What calls Copy()?
Copy() is called by 1 function(s): SaveUploadedFile.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free