You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: scanner.go
    path of file: ./repos/go-git/plumbing/format/pktline
    
    the code of the file until where you have to start completion: package pktline

import (
	"byte
    
func (s *Scanner) Scan() bool {
	var l int
	l, s.err = s.readPayloadLen()
	if s.err == io.EOF {
		s.err = nil
		return false
	}
	if s.err != nil {
		return false
	}

	if cap(s.payload) < l {
		s.payload = make([]byte, 0, l)
	}

	if _, s.err = io.ReadFull(s.r, s.payload[:l]); s.err != nil {
		return false
	}
	s.payload = s.payload[:l]
	trace.Packet.Printf("packet: < %04x %s", l, s.payload)

	if bytes.HasPrefix(s.payload, errPrefix) {
		s.err = &ErrorLine{
			Text: strings.TrimSpace(string(s.payload[4:])),
		}
		return false
	}

	return true
}