MCPcopy Create free account
hub / github.com/imroc/req / skipSpace

Method skipSpace

textproto_reader.go:179–194  ·  view source on GitHub ↗

skipSpace skips R over all spaces and returns the number of bytes skipped.

()

Source from the content-addressed store, hash-verified

177
178// skipSpace skips R over all spaces and returns the number of bytes skipped.
179func (r *textprotoReader) skipSpace() int {
180 n := 0
181 for {
182 c, err := r.R.ReadByte()
183 if err != nil {
184 // Bufio will keep err until next read.
185 break
186 }
187 if c != ' ' && c != '\t' {
188 r.R.UnreadByte()
189 break
190 }
191 n++
192 }
193 return n
194}
195
196// A protocolError describes a protocol violation such
197// as an invalid response or a hung-up connection.

Callers 1

Calls 1

ReadByteMethod · 0.80

Tested by

no test coverage detected