artemvang/p100-go

why do you use device.Handshake() instead of p100.handshake()?

Opened this issue · 1 comments

I'm trying to understand your example code to use it myself.
plug := p100.New("192.168.0.100", "example@gmail.com", "password")

if err := device.Handshake(); err != nil {
log.Panic(err)
}
Why do you use device.Handshake()? And not plug.Handshake() or p100.Handshake()?
Where is the word device come from?

Thanks in advance, best regards
Jan Willem

In the meantime I solved my above question. According to the Go language definitions you have to use plug.Handshake())