I do as written an the Golang tutorial http://golang.org/doc/code.html#remote

My env settings:

C:\sbox\go\example>set go
    GOPATH=C:\sbox\go\example
    GOROOT=C:\Go

The example/ folder has only src/ folder:

C:\sbox\go\example\
             |
             --src\

Now I call go get as described and get an error:

C:\sbox\go\example>go get code.google.com/p/go.example/hello
# cd .; hg clone -U https://code.google.com/p/go.example C:\sbox\go\example\src\code.google.com\p\go.example
package code.google.com/p/go.example/hello: exec: "hg": executable file not found in %PATH%

After calling go get, though, my example/ folder becomes like this:

C:\sbox\go\example\
             |
             --src\
                |
                code.google.com\
                       |
                       --p\

And that's all. Nothing more installed.

Then I add a code to my directory structure and it becomes like this:

C:\sbox\go\example\
             |
             --src\
                |
                ---code.google.com\
                |        |
                |        --p\
                |
                ---github.com\
                       |
                       --user\
                           |
                           --hello\
                           |   |
                           |   --hello.go
                           |
                           --newmath\
                                |
                                --sqrt.go

hello.go is like this:

package main

import (
    "fmt"
    "github.com/user/newmath"
    //"code.google.com/p/go.example/newmath"
)

func main() {
    fmt.Printf("Hello, wor
go
Edit
Report