Standard library / net/textproto

textproto.Pipeline.EndRequest()

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

Formal Syntax & Structure

go syntaxgo
func (p *Pipeline) EndRequest(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.StartRequest(id)  p.EndRequest(id)  p.StartRequest(next)  p.EndRequest(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