MCPcopy
hub / github.com/alecthomas/kong / Pop

Method Pop

scanner.go:151–158  ·  view source on GitHub ↗

Pop the front token off the Scanner.

()

Source from the content-addressed store, hash-verified

149
150// Pop the front token off the Scanner.
151func (s *Scanner) Pop() Token {
152 if len(s.args) == 0 {
153 return Token{Type: EOLToken}
154 }
155 arg := s.args[0]
156 s.args = s.args[1:]
157 return arg
158}
159
160type expectedError struct {
161 context string

Callers 11

PopValueMethod · 0.95
PopWhileMethod · 0.95
PopUntilMethod · 0.95
TestScannerTakeFunction · 0.80
TestScannerPeekFunction · 0.80
DecodeMethod · 0.80
mapDecoderFunction · 0.80
sliceDecoderFunction · 0.80
endParsingMethod · 0.80
traceMethod · 0.80
parseFlagMethod · 0.80

Calls

no outgoing calls

Tested by 2

TestScannerTakeFunction · 0.64
TestScannerPeekFunction · 0.64