MCPcopy Index your code
hub / github.com/ContainerSSH/ContainerSSH / getBytes

Method getBytes

internal/auditlog/codec/binary/header.go:27–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27func (h Header) getBytes() []byte {
28 versionBytes := make([]byte, 8)
29 binary.LittleEndian.PutUint64(versionBytes, h.Version)
30 result := make([]byte, FileFormatLength+8)
31 for i := 0; i < FileFormatLength; i++ {
32 result[i] = fileFormatBytes[i]
33 }
34 for i := 0; i < 8; i++ {
35 result[i+FileFormatLength] = versionBytes[i]
36 }
37 return result
38}
39
40func newHeader(version uint64) Header {
41 return Header{

Callers 1

EncodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected