mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-18 16:01:05 +00:00
14 lines
234 B
Go
14 lines
234 B
Go
package gin
|
|
|
|
import (
|
|
"net/http/httptest"
|
|
)
|
|
|
|
func CreateTestContext() (c *Context, w *httptest.ResponseRecorder, r *Engine) {
|
|
w = httptest.NewRecorder()
|
|
r = New()
|
|
c = r.allocateContext()
|
|
c.reset()
|
|
c.writermem.reset(w)
|
|
return
|
|
}
|