Standard library / net/textproto
textproto.Pipeline.Next()
Allocate a sequence ID for a request and its response. Expected stdout: '0 1\n'.
Formal Syntax & Structure
go syntaxgo
func (p *Pipeline) Next() uintReturn Value
uint
Next sequence ID.
Working Example
Example Snippetgo
package main
import ( "fmt" "net/textproto")
func main() { var p textproto.Pipeline; fmt.Println(p.Next(), p.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) }}