FAQ
Hi,
I try to write web socket using go language...the installed GO directory is
in C:\go folder..

This is how I added GOPATH..

C:\>mkdir packages
C:\>set GOPATH=/ packages
C:\>go get code.google.com/p/go.net/websocket

Above works fine without any error..then I create main.go in folder
packages, and import the "code.google.com/p/go.net/websocket" and build the
application.
But it always gives the following error .

cannot find package "code.google.com/p/go.net/websocket" in any of:

c:\go\src\pkg\code.google.com\p\go.net\websocket (from $GOROOT)

($GOPATH not set)


I read the earlier posts and try hard to correct this error...But I
couldn''t find it...


Please help me.....



--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Henrik Johansson at Jan 20, 2014 at 12:34 pm
    Did you install it?

    go get code.google.com/p/go.net/websocket




    On Mon, Jan 20, 2014 at 1:31 PM, kate Fernando wrote:

    Hi,
    I try to write web socket using go language...the installed GO directory
    is in C:\go folder..

    This is how I added GOPATH..

    C:\>mkdir packages
    C:\>set GOPATH=/ packages
    C:\>go get code.google.com/p/go.net/websocket

    Above works fine without any error..then I create main.go in folder
    packages, and import the "code.google.com/p/go.net/websocket" and build
    the application.
    But it always gives the following error .

    cannot find package "code.google.com/p/go.net/websocket" in any of:

    c:\go\src\pkg\code.google.com\p\go.net\websocket (from $GOROOT)

    ($GOPATH not set)


    I read the earlier posts and try hard to correct this error...But I
    couldn''t find it...


    Please help me.....



    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • kate Fernando at Jan 20, 2014 at 12:53 pm
    yes...It was installed to following folder...

    C:\packages\pkg\windows_386\code.google.com\p\go.net

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Volker Dobler at Jan 20, 2014 at 1:22 pm

    Am Montag, 20. Januar 2014 13:31:13 UTC+1 schrieb kate Fernando:
    cannot find package "code.google.com/p/go.net/websocket" in any of:

    c:\go\src\pkg\code.google.com\p\go.net\websocket (from $GOROOT)

    ($GOPATH not set)
    As the last line states: Your GOPATH is _not_ set. Set (and export) it.
    However you do such stuff on Windows.

    V.


    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • kate Fernando at Jan 20, 2014 at 1:42 pm
    I set the GOPATH as shown above as system variable...Is it ok?I try to use
    export command in windows.But it gives error

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • kate Fernando at Jan 20, 2014 at 1:43 pm
    Sorry.

    I set the GOPATH as system variable in advanced system settings...Is it ok?

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Henrik Johansson at Jan 20, 2014 at 1:46 pm
    If you print echo %GOPATH% in the terminal where you try to build, what
    does it say?

    On Mon, Jan 20, 2014 at 2:43 PM, kate Fernando wrote:


    Sorry.

    I set the GOPATH as system variable in advanced system settings...Is it ok?

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • kate Fernando at Jan 20, 2014 at 1:54 pm
    it gives the
    >


    "C:\packages" as the output.'''packages" is a new folder which I create as
    workspace....


    Can I know where should I created go files for web sockets?

    Is it in the workspace(C:\packages) or C:\go\src?

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Volker Dobler at Jan 20, 2014 at 2:03 pm
    C:/go is your Go installation: Never ever put anything in there.
    Never point you GOPATH into this directory. Never.

    Have your own workspace like C:/packages and make sure
    you have a C:/packages/src folder in there and that GOPATH is
    set (and exported) and equals c:/packages. Make sure you
    can write into these folders.

    V.

    Am Montag, 20. Januar 2014 14:54:50 UTC+1 schrieb kate Fernando:


    it gives the

    "C:\packages" as the output.'''packages" is a new folder which I create as
    workspace....


    Can I know where should I created go files for web sockets?

    Is it in the workspace(C:\packages) or C:\go\src?
    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • kate Fernando at Jan 20, 2014 at 2:17 pm
    Thankyou very much for your help....I figured out the error...I used
    LiteIde but didn't set the gopath there...when I correct it,that problem
    was solved...

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJan 20, '14 at 12:31p
activeJan 20, '14 at 2:17p
posts10
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase