Standard library / net/textproto

textproto.Pipeline.EndResponse()

Signal that the response has finished so the next response can proceed. Expected stdout: '1\n'.

Formal Syntax & Structure

go syntaxgo
func (p *Pipeline) EndResponse(id uint)

Parameters & Attributes

NameTypeDescription
iduintSequence ID allocated by Pipeline.Next.

Working Example

Example Snippetgo
package main
import (  "fmt"  "net/textproto")
func main() {  var p textproto.Pipeline  id := p.Next()  next := p.Next()  p.StartResponse(id)  p.EndResponse(id)  p.StartResponse(next)  p.EndResponse(next)  fmt.Println(next)}
func must[T any](v T, e error) T {  if e != nil {    panic(e)  }  return v}func check(e error) {  if e != nil {    panic(e)  }}
Go Reference