MCPcopy Create free account
hub / github.com/blues/note / binAppendInt64

Method binAppendInt64

lib/bulk.go:1571–1605  ·  view source on GitHub ↗
(ctx context.Context, value int64)

Source from the content-addressed store, hash-verified

1569}
1570
1571func (tmplContext *BulkTemplateContext) binAppendInt64(ctx context.Context, value int64) (err error) {
1572 if debugEncoding {
1573 logDebug(ctx, "append %d INT64 = %d", tmplContext.binDepth, value)
1574 }
1575 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1576 value = value >> 8
1577 if err == nil {
1578 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1579 }
1580 value = value >> 8
1581 if err == nil {
1582 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1583 }
1584 value = value >> 8
1585 if err == nil {
1586 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1587 }
1588 value = value >> 8
1589 if err == nil {
1590 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1591 }
1592 value = value >> 8
1593 if err == nil {
1594 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1595 }
1596 value = value >> 8
1597 if err == nil {
1598 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1599 }
1600 value = value >> 8
1601 if err == nil {
1602 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1603 }
1604 return err
1605}
1606
1607func (tmplContext *BulkTemplateContext) binAppendUint64(ctx context.Context, value uint64) (err error) {
1608 if debugEncoding {

Callers 2

BulkEncodeNextEntryMethod · 0.95
processTemplateValueMethod · 0.95

Calls 2

binAppendUint8Method · 0.95
logDebugFunction · 0.85

Tested by

no test coverage detected