You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2024/08/31 21:24:27 UTC
(plc4x) 14/35: fix(code-gen/go): bit reading
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit 3bce0610507d9608ef58311318a1bd1255c440d4
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Sat Aug 31 01:23:39 2024 +0200
fix(code-gen/go): bit reading
---
plc4go/spi/codegen/io/DataReaderSimpleUnsignedByte.go | 5 -----
1 file changed, 5 deletions(-)
diff --git a/plc4go/spi/codegen/io/DataReaderSimpleUnsignedByte.go b/plc4go/spi/codegen/io/DataReaderSimpleUnsignedByte.go
index fd573da6a8..ab6640813d 100644
--- a/plc4go/spi/codegen/io/DataReaderSimpleUnsignedByte.go
+++ b/plc4go/spi/codegen/io/DataReaderSimpleUnsignedByte.go
@@ -22,8 +22,6 @@ package io
import (
"context"
- "github.com/pkg/errors"
-
"github.com/apache/plc4x/plc4go/spi/utils"
)
@@ -40,8 +38,5 @@ func NewDataReaderSimpleUnsignedByte(readBuffer utils.ReadBuffer, bitLength uint
}
func (d *DataReaderSimpleUnsignedByte) Read(ctx context.Context, logicalName string, readerArgs ...utils.WithReaderArgs) (uint8, error) {
- if d.bitLength != 8 {
- return 0, errors.New("bit length must be 8 UnsignedBytes")
- }
return d.readBuffer.ReadUint8(logicalName, uint8(d.bitLength), readerArgs...)
}