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

Method binExtractInt32

lib/bulk.go:258–268  ·  view source on GitHub ↗
(ctx context.Context, what string)

Source from the content-addressed store, hash-verified

256}
257
258func (tmplContext *BulkTemplateContext) binExtractInt32(ctx context.Context, what string) (value int32) {
259 bin, success := tmplContext.binExtract(ctx, what, 4)
260 if !success {
261 return
262 }
263 value = int32(bin[0])
264 value = value | (int32(bin[1]) << 8)
265 value = value | (int32(bin[2]) << 16)
266 value = value | (int32(bin[3]) << 24)
267 return value
268}
269
270func (tmplContext *BulkTemplateContext) binExtractUint32(ctx context.Context, what string) (value uint32) {
271 bin, success := tmplContext.binExtract(ctx, what, 4)

Callers 1

BulkDecodeNextEntryMethod · 0.95

Calls 1

binExtractMethod · 0.95

Tested by

no test coverage detected