Home / Function/ Stream() — gin Function Reference

Stream() — gin Function Reference

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

Entity Profile

Relationship Graph

Source Code

context.go lines 1321–1336

func (c *Context) Stream(step func(w io.Writer) bool) bool {
	w := c.Writer
	clientGone := w.CloseNotify()
	for {
		select {
		case <-clientGone:
			return true
		default:
			keepOpen := step(w)
			w.Flush()
			if !keepOpen {
				return false
			}
		}
	}
}

Domain

Subdomains

Analyze Your Own Codebase

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

Try Supermodel Free