MCPcopy Create free account
hub / github.com/dagger/dagger / MarshalToSizedBuffer

Method MarshalToSizedBuffer

engine/session/git/git.pb.go:1532–1550  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

1530}
1531
1532func (m *ErrorInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
1533 i := len(dAtA)
1534 _ = i
1535 var l int
1536 _ = l
1537 if len(m.Message) > 0 {
1538 i -= len(m.Message)
1539 copy(dAtA[i:], m.Message)
1540 i = encodeVarintGit(dAtA, i, uint64(len(m.Message)))
1541 i--
1542 dAtA[i] = 0x12
1543 }
1544 if m.Type != 0 {
1545 i = encodeVarintGit(dAtA, i, uint64(m.Type))
1546 i--
1547 dAtA[i] = 0x8
1548 }
1549 return len(dAtA) - i, nil
1550}
1551
1552func encodeVarintGit(dAtA []byte, offset int, v uint64) int {
1553 offset -= sovGit(v)

Callers 3

XXX_MarshalMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

encodeVarintGitFunction · 0.85

Tested by

no test coverage detected