Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors compiling PortScanner #2

Open
rhinesj opened this issue Feb 3, 2016 · 3 comments
Open

Errors compiling PortScanner #2

rhinesj opened this issue Feb 3, 2016 · 3 comments

Comments

@rhinesj
Copy link

rhinesj commented Feb 3, 2016

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

@edib
Copy link

edib commented Jun 14, 2016

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

@rhinesj
Copy link
Author

rhinesj commented Jun 16, 2016

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 <
[email protected]> 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
#2 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/APzXGw4rWp138EEgEEEP6ReMPLTmKhORks5qLrsDgaJpZM4HSjSd
.

@anvie
Copy link
Owner

anvie commented Jun 17, 2016

Hi @rhinesj let me check, sorry for long time not checked it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants