MCPcopy Create free account
hub / github.com/drone/envsubst / read

Method read

parse/scan.go:63–72  ·  view source on GitHub ↗

read returns the next unicode character. It returns eof at the end of the string buffer.

()

Source from the content-addressed store, hash-verified

61// read returns the next unicode character. It returns eof at
62// the end of the string buffer.
63func (s *scanner) read() rune {
64 if s.pos >= len(s.buf) {
65 s.width = 0
66 return eof
67 }
68 r, w := utf8.DecodeRuneInString(s.buf[s.pos:])
69 s.width = w
70 s.pos += s.width
71 return r
72}
73
74func (s *scanner) unread() {
75 s.pos -= s.width

Callers 5

peekMethod · 0.95
scanMethod · 0.95
scanIdentMethod · 0.95
scanLbrackMethod · 0.95
parseDefaultOrSubstrMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected