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

Method MarshalToSizedBuffer

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

Source from the content-addressed store, hash-verified

1308}
1309
1310func (m *CredentialInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
1311 i := len(dAtA)
1312 _ = i
1313 var l int
1314 _ = l
1315 if len(m.Password) > 0 {
1316 i -= len(m.Password)
1317 copy(dAtA[i:], m.Password)
1318 i = encodeVarintGit(dAtA, i, uint64(len(m.Password)))
1319 i--
1320 dAtA[i] = 0x22
1321 }
1322 if len(m.Username) > 0 {
1323 i -= len(m.Username)
1324 copy(dAtA[i:], m.Username)
1325 i = encodeVarintGit(dAtA, i, uint64(len(m.Username)))
1326 i--
1327 dAtA[i] = 0x1a
1328 }
1329 if len(m.Host) > 0 {
1330 i -= len(m.Host)
1331 copy(dAtA[i:], m.Host)
1332 i = encodeVarintGit(dAtA, i, uint64(len(m.Host)))
1333 i--
1334 dAtA[i] = 0x12
1335 }
1336 if len(m.Protocol) > 0 {
1337 i -= len(m.Protocol)
1338 copy(dAtA[i:], m.Protocol)
1339 i = encodeVarintGit(dAtA, i, uint64(len(m.Protocol)))
1340 i--
1341 dAtA[i] = 0xa
1342 }
1343 return len(dAtA) - i, nil
1344}
1345
1346func (m *GitConfigRequest) Marshal() (dAtA []byte, err error) {
1347 size := m.Size()

Callers 3

XXX_MarshalMethod · 0.95
MarshalMethod · 0.95
MarshalToMethod · 0.95

Calls 1

encodeVarintGitFunction · 0.85

Tested by

no test coverage detected