TestOPTIONS() — gin Function Reference
Architecture documentation for the TestOPTIONS() function in gins_test.go from the gin codebase.
Entity Profile
Dependency Diagram
graph TD 3a57c123_7a1a_291d_3e94_70916aaac578["TestOPTIONS()"] 79139b72_4aa3_e743_29b2_537065ba4bec["gins_test.go"] 3a57c123_7a1a_291d_3e94_70916aaac578 -->|defined in| 79139b72_4aa3_e743_29b2_537065ba4bec style 3a57c123_7a1a_291d_3e94_70916aaac578 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
ginS/gins_test.go lines 86–97
func TestOPTIONS(t *testing.T) {
OPTIONS("/options", func(c *gin.Context) {
c.String(http.StatusOK, "options")
})
req := httptest.NewRequest(http.MethodOptions, "/options", nil)
w := httptest.NewRecorder()
engine().ServeHTTP(w, req)
assert.Equal(t, http.StatusOK, w.Code)
assert.Equal(t, "options", w.Body.String())
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does TestOPTIONS() do?
TestOPTIONS() is a function in the gin codebase, defined in ginS/gins_test.go.
Where is TestOPTIONS() defined?
TestOPTIONS() is defined in ginS/gins_test.go at line 86.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free