Import "golang.org/x/net/icmp" failed!

959 views
Skip to first unread message

Emad Ghasemi

unread,
Jan 10, 2015, 3:23:24 PM1/10/15
to golan...@googlegroups.com
Hi everybody,
i'm new to Golang and I cant find any good resource about this subject

I see that people use import "golang.org/x/net/icmp" or things like this(https://github.com/tatsushid/go-fastping/blob/master/fastping.go), but I cant get them work !
I tried to install the package but get error like

go get golang.com/x/net
package golang.com/x/net: unrecognized import path "golang.com/x/net"

or
go get github.com/golang/net

but all the import are pointing to golang.org/x/net/...

I don't know how should I use packages golang.org/x/net/icmp and other related ones...

Can any body tell me about this ?
Thanks ...

Will Norris

unread,
Jan 10, 2015, 3:34:32 PM1/10/15
to Emad Ghasemi, golang-nuts
should be "go get golang.org/x/net/icmp" (you had .com instead of .org)

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Emad Ghasemi

unread,
Jan 10, 2015, 3:47:29 PM1/10/15
to golan...@googlegroups.com, emad....@gmail.com
ُSorry, that was miss spelling
it doesn't make sense 
Still say 

λ go get golang.org/x/net/icmp
package golang.org/x/net/icmp: unrecognized import path "golang.org/x/net/icmp"

even the sample from here  dosn't work :-/

prog.go:4: can't find import: "golang.org/x/net/icmp"
 [process exited with non-zero status]

Will Norris

unread,
Jan 10, 2015, 3:57:13 PM1/10/15
to Emad Ghasemi, golang-nuts
Does `curl https://golang.org/x/net/icmp` successfully return content for you?  What about `curl https://go.googlesource.com/net`?

Your G+ profile mentions that you are in Iran.  If the second URL above returns an error, then it is almost certainly due to IP restrictions on googlesource.com.  You could instead run:

mkdir -p $GOPATH/src/golang.org/x/net

Will Norris

unread,
Jan 10, 2015, 4:02:26 PM1/10/15
to Emad Ghasemi, golang-nuts
Regarding http://play.golang.org/p/wKaB53L3d7, the Go Playground can only use the standard library that ships with go.

Emad Ghasemi

unread,
Jan 10, 2015, 4:25:40 PM1/10/15
to golan...@googlegroups.com, emad....@gmail.com
Yes, you're right.

Thanks for the git clone ...,
Reply all
Reply to author
Forward
0 new messages