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

Method binAppendInt24

lib/bulk.go:1331–1345  ·  view source on GitHub ↗
(ctx context.Context, value int32)

Source from the content-addressed store, hash-verified

1329}
1330
1331func (tmplContext *BulkTemplateContext) binAppendInt24(ctx context.Context, value int32) (err error) {
1332 if debugEncoding {
1333 logDebug(ctx, "append %d INT24 = %d", tmplContext.binDepth, value)
1334 }
1335 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1336 value = value >> 8
1337 if err == nil {
1338 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1339 }
1340 value = value >> 8
1341 if err == nil {
1342 err = tmplContext.binAppendUint8(ctx, uint8(value&0xff))
1343 }
1344 return err
1345}
1346
1347func (tmplContext *BulkTemplateContext) binAppendUint24(ctx context.Context, value uint32) (err error) {
1348 if debugEncoding {

Callers 1

processTemplateValueMethod · 0.95

Calls 2

binAppendUint8Method · 0.95
logDebugFunction · 0.85

Tested by

no test coverage detected