16 lines
254 B
Go
16 lines
254 B
Go
package goadb
|
|
|
|
import "github.com/zach-klippenstein/goadb/wire"
|
|
|
|
type nilSafeDialer struct {
|
|
wire.Dialer
|
|
}
|
|
|
|
func (d nilSafeDialer) Dial() (*wire.Conn, error) {
|
|
if d.Dialer == nil {
|
|
d.Dialer = wire.NewDialer("", AdbPort)
|
|
}
|
|
|
|
return d.Dialer.Dial()
|
|
}
|