MCPcopy
hub / github.com/nirui/sshwifty / String

Method String

application/command/header.go:110–127  ·  view source on GitHub ↗

Set set a new value of the Header

()

Source from the content-addressed store, hash-verified

108
109// Set set a new value of the Header
110func (p Header) String() string {
111 switch p.Type() {
112 case HeaderControl:
113 return fmt.Sprintf("Control (%d bytes)", p.Data())
114
115 case HeaderStream:
116 return fmt.Sprintf("Stream (%d)", p.Data())
117
118 case HeaderClose:
119 return fmt.Sprintf("Close (Stream %d)", p.Data())
120
121 case HeaderCompleted:
122 return fmt.Sprintf("Completed (Stream %d)", p.Data())
123
124 default:
125 return "Unknown"
126 }
127}
128
129// IsStreamControl returns true when the header is for stream control, false
130// when otherwise

Callers 4

ServeHTTPMethod · 0.45
HandleMethod · 0.45
buildListenerMethod · 0.45

Calls 2

TypeMethod · 0.95
DataMethod · 0.95

Tested by

no test coverage detected