This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch chore/go_update
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 94f6cf6234a80bca64f84cb9a311a0add6b512e9
Author: Sebastian Rühl <[email protected]>
AuthorDate: Thu Oct 9 11:50:01 2025 +0200

    chore(deps): upgrade go version
---
 plc4go/go.mod                                      | 2 +-
 plc4go/internal/cbus/statusrequesttype_string.go   | 5 +++--
 plc4go/internal/cbus/tagtype_string.go             | 5 +++--
 plc4go/internal/s7/tagtype_string.go               | 5 +++--
 plc4go/pkg/api/model/plcsubscriptiontype_string.go | 8 ++++----
 plc4go/pom.xml                                     | 2 +-
 plc4go/spi/testutils/steptype_string.go            | 8 ++++----
 7 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/plc4go/go.mod b/plc4go/go.mod
index bd47f90c3e..79d670d51e 100644
--- a/plc4go/go.mod
+++ b/plc4go/go.mod
@@ -19,7 +19,7 @@
 
 module github.com/apache/plc4x/plc4go
 
-go 1.24.0
+go 1.25
 
 require (
        github.com/IBM/netaddr v1.5.0
diff --git a/plc4go/internal/cbus/statusrequesttype_string.go 
b/plc4go/internal/cbus/statusrequesttype_string.go
index 796ab8f03f..f1e9060cfd 100644
--- a/plc4go/internal/cbus/statusrequesttype_string.go
+++ b/plc4go/internal/cbus/statusrequesttype_string.go
@@ -36,8 +36,9 @@ const _StatusRequestType_name = 
"StatusRequestTypeBinaryStateStatusRequestTypeLe
 var _StatusRequestType_index = [...]uint8{0, 28, 50}
 
 func (i StatusRequestType) String() string {
-       if i >= StatusRequestType(len(_StatusRequestType_index)-1) {
+       idx := int(i) - 0
+       if i < 0 || idx >= len(_StatusRequestType_index)-1 {
                return "StatusRequestType(" + strconv.FormatInt(int64(i), 10) + 
")"
        }
-       return 
_StatusRequestType_name[_StatusRequestType_index[i]:_StatusRequestType_index[i+1]]
+       return 
_StatusRequestType_name[_StatusRequestType_index[idx]:_StatusRequestType_index[idx+1]]
 }
diff --git a/plc4go/internal/cbus/tagtype_string.go 
b/plc4go/internal/cbus/tagtype_string.go
index 1ad0bb84a2..4c6b81a92a 100644
--- a/plc4go/internal/cbus/tagtype_string.go
+++ b/plc4go/internal/cbus/tagtype_string.go
@@ -47,8 +47,9 @@ const _TagType_name = 
"STATUSCAL_RESETCAL_RECALLCAL_IDENTIFYCAL_GETSTATUSCAL_WRI
 var _TagType_index = [...]uint8{0, 6, 15, 25, 37, 50, 59, 77, 87, 106, 109, 
120, 138, 147}
 
 func (i TagType) String() string {
-       if i >= TagType(len(_TagType_index)-1) {
+       idx := int(i) - 0
+       if i < 0 || idx >= len(_TagType_index)-1 {
                return "TagType(" + strconv.FormatInt(int64(i), 10) + ")"
        }
-       return _TagType_name[_TagType_index[i]:_TagType_index[i+1]]
+       return _TagType_name[_TagType_index[idx]:_TagType_index[idx+1]]
 }
diff --git a/plc4go/internal/s7/tagtype_string.go 
b/plc4go/internal/s7/tagtype_string.go
index 6e05b1a95e..19772a0172 100644
--- a/plc4go/internal/s7/tagtype_string.go
+++ b/plc4go/internal/s7/tagtype_string.go
@@ -36,8 +36,9 @@ const _TagType_name = "S7TagS7StringTag"
 var _TagType_index = [...]uint8{0, 5, 16}
 
 func (i TagType) String() string {
-       if i >= TagType(len(_TagType_index)-1) {
+       idx := int(i) - 0
+       if i < 0 || idx >= len(_TagType_index)-1 {
                return "TagType(" + strconv.FormatInt(int64(i), 10) + ")"
        }
-       return _TagType_name[_TagType_index[i]:_TagType_index[i+1]]
+       return _TagType_name[_TagType_index[idx]:_TagType_index[idx+1]]
 }
diff --git a/plc4go/pkg/api/model/plcsubscriptiontype_string.go 
b/plc4go/pkg/api/model/plcsubscriptiontype_string.go
index e9372f01e0..ff2fa0f1bb 100644
--- a/plc4go/pkg/api/model/plcsubscriptiontype_string.go
+++ b/plc4go/pkg/api/model/plcsubscriptiontype_string.go
@@ -37,9 +37,9 @@ const _PlcSubscriptionType_name = 
"SubscriptionCyclicSubscriptionChangeOfStateSu
 var _PlcSubscriptionType_index = [...]uint8{0, 18, 43, 60}
 
 func (i PlcSubscriptionType) String() string {
-       i -= 1
-       if i >= PlcSubscriptionType(len(_PlcSubscriptionType_index)-1) {
-               return "PlcSubscriptionType(" + strconv.FormatInt(int64(i+1), 
10) + ")"
+       idx := int(i) - 1
+       if i < 1 || idx >= len(_PlcSubscriptionType_index)-1 {
+               return "PlcSubscriptionType(" + strconv.FormatInt(int64(i), 10) 
+ ")"
        }
-       return 
_PlcSubscriptionType_name[_PlcSubscriptionType_index[i]:_PlcSubscriptionType_index[i+1]]
+       return 
_PlcSubscriptionType_name[_PlcSubscriptionType_index[idx]:_PlcSubscriptionType_index[idx+1]]
 }
diff --git a/plc4go/pom.xml b/plc4go/pom.xml
index 09fbd59d84..f4445a7acf 100644
--- a/plc4go/pom.xml
+++ b/plc4go/pom.xml
@@ -51,7 +51,7 @@
 
     <go.cover.flag>-coverprofile=target/coverage.out</go.cover.flag>
 
-    <go.version>1.24.2</go.version>
+    <go.version>1.25.2</go.version>
   </properties>
 
   <build>
diff --git a/plc4go/spi/testutils/steptype_string.go 
b/plc4go/spi/testutils/steptype_string.go
index 64e3e16a3f..dcc74b9389 100644
--- a/plc4go/spi/testutils/steptype_string.go
+++ b/plc4go/spi/testutils/steptype_string.go
@@ -42,9 +42,9 @@ const _StepType_name = 
"StepTypeOutgoingPlcMessageStepTypeOutgoingPlcBytesStepTy
 var _StepType_index = [...]uint8{0, 26, 50, 76, 100, 118, 137, 150, 167}
 
 func (i StepType) String() string {
-       i -= 1
-       if i >= StepType(len(_StepType_index)-1) {
-               return "StepType(" + strconv.FormatInt(int64(i+1), 10) + ")"
+       idx := int(i) - 1
+       if i < 1 || idx >= len(_StepType_index)-1 {
+               return "StepType(" + strconv.FormatInt(int64(i), 10) + ")"
        }
-       return _StepType_name[_StepType_index[i]:_StepType_index[i+1]]
+       return _StepType_name[_StepType_index[idx]:_StepType_index[idx+1]]
 }

Reply via email to