Skip to content

Commit 9f7018a

Browse files
authored
Merge pull request #30 from jattento/fix/improve-decode-stability
improve decode stability and update readme
2 parents 5533f92 + ddc637a commit 9f7018a

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
[![Last release](https://img.shields.io/github/v/release/jattento/go-iso8583?style=plastic)](https://github.com/jattento/go-iso8583/releases)
55

66

7-
| Version | Build |
8-
|----------|:-------------:|
7+
| Version | Build |
8+
|---------|:-------------:|
9+
| Go 1.18 |[![Build Status](https://travis-ci.com/jattento/go-iso8583.svg?branch=master)](https://travis-ci.com/jattento/go-iso8583)|
10+
| Go 1.17 |[![Build Status](https://travis-ci.com/jattento/go-iso8583.svg?branch=master)](https://travis-ci.com/jattento/go-iso8583)|
911
| Go 1.16 |[![Build Status](https://travis-ci.com/jattento/go-iso8583.svg?branch=master)](https://travis-ci.com/jattento/go-iso8583)|
1012
| Go 1.15 |[![Build Status](https://travis-ci.com/jattento/go-iso8583.svg?branch=master)](https://travis-ci.com/jattento/go-iso8583)|
1113
| Go 1.14 |[![Build Status](https://travis-ci.com/jattento/go-iso8583.svg?branch=master)](https://travis-ci.com/jattento/go-iso8583)|
@@ -73,7 +75,7 @@ type exampleMessage struct {
7375
SecurityRelatedControlInformation iso8583.VAR `iso8583:"53,length:16,encoding:ebcdic,omitempty"`
7476
AdditionalAmounts iso8583.LLLVAR `iso8583:"54,length:120,encoding:ebcdic,omitempty"`
7577
IntegratedCircuitCardSystemRelatedData iso8583.LLLBINARY `iso8583:"55,length:999,encoding:ebcdic,omitempty"`
76-
MessageSecurityCode iso8583.VAR `iso8583:"96,length:8,encoding:ebcdic,omitempty"`
78+
MessageSecurityCode iso8583.VAR `iso8583:"96,length:8,encoding:ebcdic,omitempty"`
7779
}
7880
```
7981

pkg/iso8583/decode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ func getBitsMethod(strct reflect.Value, fieldName string) (func() (map[int]bool,
323323

324324
func isPointerToStruct(v reflect.Value) bool {
325325
underlyingObj := v
326-
for underlyingObj.Kind() == reflect.Ptr {
326+
for underlyingObj.Kind() == reflect.Ptr || underlyingObj.Kind() == reflect.Interface {
327327
underlyingObj = underlyingObj.Elem()
328328
}
329329

0 commit comments

Comments
 (0)