Open rhinesj opened 8 years ago
I am facing same problem $ go version go version go1.6.1 linux/amd64
src/github.com/anvie/port-scanner/PortScanner.go:27: too few values in struct initializer src/github.com/anvie/port-scanner/PortScanner.go:50: cannot use h.timeout (type int) as type time.Duration in argument to net.DialTimeout src/github.com/anvie/port-scanner/PortScanner.go:82: cannot use h.timeout (type int) as type time.Duration in argument to net.DialTimeout src/github.com/anvie/port-scanner/PortScanner.go:87: cannot use conn (type net.Conn) as type *net.TCPConn in return argument: need type assertion
I went ahead and forked and fixed it. I think I submitted a PR? I don't remember.
https://github.com/rhinesj/port-scanner
On Tue, Jun 14, 2016 at 9:30 AM, ibrahim edib kokdemir < notifications@github.com> wrote:
I am facing same problem $ go version go version go1.6.1 linux/amd64 github.com/anvie/port-scanner
src/github.com/anvie/port-scanner/PortScanner.go:27: too few values in struct initializer src/github.com/anvie/port-scanner/PortScanner.go:50: cannot use h.timeout (type int) as type time.Duration in argument to net.DialTimeout src/github.com/anvie/port-scanner/PortScanner.go:82: cannot use h.timeout (type int) as type time.Duration in argument to net.DialTimeout src/github.com/anvie/port-scanner/PortScanner.go:87: cannot use conn (type net.Conn) as type *net.TCPConn in return argument: need type assertion
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/anvie/port-scanner/issues/2#issuecomment-225899537, or mute the thread https://github.com/notifications/unsubscribe/APzXGw4rWp138EEgEEEP6ReMPLTmKhORks5qLrsDgaJpZM4HSjSd .
Hi @rhinesj let me check, sorry for long time not checked it up.
It looks like a timeout field was added and the rest of the code wasn't updated to account for it.
go version go1.5.3 darwin/amd64
github.com/anvie/port-scanner
../../../../anvie/port-scanner/PortScanner.go:27: too few values in struct initializer ../../../../anvie/port-scanner/PortScanner.go:50: cannot use h.timeout (type int) as type time.Duration in argument to net.DialTimeout ../../../../anvie/port-scanner/PortScanner.go:82: cannot use h.timeout (type int) as type time.Duration in argument to net.DialTimeout ../../../../anvie/port-scanner/PortScanner.go:87: cannot use conn (type net.Conn) as type *net.TCPConn in return argument: need type assertion