File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ import (
99 "fmt"
1010)
1111
12+ // logger is the interface to the required logging functions
13+ type logger interface {
14+ Printf (format string , v ... interface {})
15+ }
16+
1217// ClientHandler is the interface that groups the Packager and Transporter methods.
1318type ClientHandler interface {
1419 Packager
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ package modbus
66
77import (
88 "io"
9- "log"
109 "sync"
1110 "time"
1211
@@ -24,7 +23,7 @@ type serialPort struct {
2423 // Serial port configuration.
2524 serial.Config
2625
27- Logger * log. Logger
26+ Logger logger
2827 IdleTimeout time.Duration
2928
3029 mu sync.Mutex
Original file line number Diff line number Diff line change 88 "encoding/binary"
99 "fmt"
1010 "io"
11- "log"
1211 "net"
1312 "sync"
1413 "sync/atomic"
@@ -133,7 +132,7 @@ type tcpTransporter struct {
133132 // Recovery timeout if the protocol is malformed, e.g. wrong transaction ID
134133 ProtocolRecoveryTimeout time.Duration
135134 // Transmission logger
136- Logger * log. Logger
135+ Logger logger
137136
138137 // TCP connection
139138 mu sync.Mutex
You can’t perform that action at this time.
0 commit comments