Home / Function/ TestContextStreamWithClientGone() — gin Function Reference

TestContextStreamWithClientGone() — gin Function Reference

Architecture documentation for the TestContextStreamWithClientGone() function in context_test.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  1d802afe_6f74_0cad_2a06_57611a654140["TestContextStreamWithClientGone()"]
  0e74e95c_7721_b1fe_e017_3622be489053["CreateTestResponseRecorder()"]
  1d802afe_6f74_0cad_2a06_57611a654140 -->|calls| 0e74e95c_7721_b1fe_e017_3622be489053
  0fc3ccf0_9fed_cfaf_3a31_d96279fa82cf["closeClient()"]
  1d802afe_6f74_0cad_2a06_57611a654140 -->|calls| 0fc3ccf0_9fed_cfaf_3a31_d96279fa82cf
  style 1d802afe_6f74_0cad_2a06_57611a654140 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

context_test.go lines 3025–3041

func TestContextStreamWithClientGone(t *testing.T) {
	w := CreateTestResponseRecorder()
	c, _ := CreateTestContext(w)

	c.Stream(func(writer io.Writer) bool {
		defer func() {
			w.closeClient()
		}()

		_, err := writer.Write([]byte("test"))
		require.NoError(t, err)

		return true
	})

	assert.Equal(t, "test", w.Body.String())
}

Domain

Subdomains

Frequently Asked Questions

What does TestContextStreamWithClientGone() do?
TestContextStreamWithClientGone() is a function in the gin codebase.
What does TestContextStreamWithClientGone() call?
TestContextStreamWithClientGone() calls 2 function(s): CreateTestResponseRecorder, closeClient.

Analyze Your Own Codebase

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

Try Supermodel Free