MCPcopy Create free account
hub / github.com/go-git/go-git / Encode

Method Encode

plumbing/format/pktline/error.go:32–35  ·  view source on GitHub ↗

Encode encodes the ErrorLine into a packet line.

(w io.Writer)

Source from the content-addressed store, hash-verified

30
31// Encode encodes the ErrorLine into a packet line.
32func (e *ErrorLine) Encode(w io.Writer) error {
33 p := NewEncoder(w)
34 return p.Encodef("%s%s\n", string(errPrefix), e.Text)
35}
36
37// Decode decodes a packet line into an ErrorLine.
38func (e *ErrorLine) Decode(r io.Reader) error {

Callers 2

TestEncodeEmptyErrorLineFunction · 0.95
TestEncodeErrorLineFunction · 0.95

Calls 2

EncodefMethod · 0.95
NewEncoderFunction · 0.70

Tested by 2

TestEncodeEmptyErrorLineFunction · 0.76
TestEncodeErrorLineFunction · 0.76