chore: use Go 1.26 (#26786)
This commit is contained in:
parent
88ecd6f152
commit
0ee6d787e1
33 changed files with 96 additions and 122 deletions
|
|
@ -44,7 +44,7 @@ func (h *handler) logResult(op string, b []byte, err error) {
|
|||
func (h *handler) exceptionToUint16AndError(op string, b []byte, err error) ([]uint16, error) {
|
||||
h.logResult(op, b, err)
|
||||
|
||||
if me := new(gridx.Error); errors.As(err, &me) {
|
||||
if me, ok := errors.AsType[*gridx.Error](err); ok {
|
||||
err = mbserver.MapExceptionCodeToError(me.ExceptionCode)
|
||||
}
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ func coilsToBytes(b []bool) []byte {
|
|||
func (h *handler) bytesToBoolResult(op string, qty uint16, b []byte, err error) ([]bool, error) {
|
||||
h.logResult(op, b, err)
|
||||
|
||||
if me := new(gridx.Error); errors.As(err, &me) {
|
||||
if me, ok := errors.AsType[*gridx.Error](err); ok {
|
||||
err = mbserver.MapExceptionCodeToError(me.ExceptionCode)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue