MCPcopy Create free account
hub / github.com/containerd/containerd / encodeInt

Function encodeInt

core/metadata/images.go:456–467  ·  view source on GitHub ↗
(i int64)

Source from the content-addressed store, hash-verified

454}
455
456func encodeInt(i int64) ([]byte, error) {
457 var (
458 buf [binary.MaxVarintLen64]byte
459 iEncoded = buf[:]
460 )
461 iEncoded = iEncoded[:binary.PutVarint(iEncoded, i)]
462
463 if len(iEncoded) == 0 {
464 return nil, fmt.Errorf("failed encoding integer = %v", i)
465 }
466 return iEncoded, nil
467}

Callers 4

InitMethod · 0.85
commitMethod · 0.85
writeInfoFunction · 0.85
writeImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…