File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,15 @@ The following example demonstrates how to:
6464- Unpack and parse a received message
6565
6666``` go
67+ package main
68+
69+ import (
70+ " os"
71+
72+ " github.com/moov-io/iso8583"
73+ " github.com/moov-io/iso8583/examples"
74+ )
75+
6776// Define types for the message fields
6877type Authorization struct {
6978 MTI string ` iso8583:"0"` // Message Type Indicator
@@ -81,7 +90,7 @@ type AcceptorInformation struct {
8190 Country string ` index:"3"`
8291}
8392
84- func Example () {
93+ func main () {
8594 // Pack the message
8695 msg := iso8583.NewMessage (examples.Spec )
8796
@@ -114,7 +123,7 @@ func Example() {
114123 // ...
115124
116125 // Unpack the message
117- msg = iso8583.NewMessage (Spec)
126+ msg = iso8583.NewMessage (examples. Spec )
118127 err = msg.Unpack (packed)
119128 if err != nil {
120129 panic (err)
You can’t perform that action at this time.
0 commit comments