MCPcopy Create free account
hub / github.com/OpenPrinting/goipp / decode

Method decode

value.go:271–277  ·  view source on GitHub ↗

Decode Integer Value from wire format

(data []byte)

Source from the content-addressed store, hash-verified

269
270// Decode Integer Value from wire format
271func (Integer) decode(data []byte) (Value, error) {
272 if len(data) != 4 {
273 return nil, errors.New("value must be 4 bytes")
274 }
275
276 return Integer(int32(binary.BigEndian.Uint32(data))), nil
277}
278
279// Boolean is the Value that contains true of false
280//

Callers

nothing calls this directly

Calls 1

IntegerTypeAlias · 0.85

Tested by

no test coverage detected