-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/tour: instructions on how to install gotour #9976
Comments
Run
|
Do you have access to https://golang.org? Perhaps something is blocking
go get from accessing golang.org.
|
Works for me. I suspect a problem on your end. |
I have tried |
activating proxy at shell help to export {http,https,ftp}_proxy='http://127.0.0.1:8118' |
I have acess to https://golang.org but the error perssists. |
and when i use github.com/golang/tour/gotour i get...........
|
solution for @yaojingguo's problem: package github.com/golang/tour/gotour
imports github.com/golang/tour/gotour
imports github.com/golang/tour/gotour: code in directory /home/jing/code/github/go-tour/src/github.com/golang/tour/gotour expects import "golang.org/x/tour/gotour" you need remove the commit by @adg , all: add import comments. // Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package wc
import "fmt"
// Test runs a test suite against f.
func Test(f func(string) map[string]int) {
ok := true
for _, c := range testCases {
got := f(c.in)
if len(c.want) != len(got) {
ok = false
} else {
for k := range c.want {
if c.want[k] != got[k] {
ok = false
}
}
}
if !ok {
fmt.Printf("FAIL\n f(%q) =\n %#v\n want:\n %#v",
c.in, got, c.want)
break
}
fmt.Printf("PASS\n f(%q) = \n %#v\n", c.in, got)
}
}
var testCases = []struct {
in string
want map[string]int
}{
{"I am learning Go!", map[string]int{
"I": 1, "am": 1, "learning": 1, "Go!": 1,
}},
{"The quick brown fox jumped over the lazy dog.", map[string]int{
"The": 1, "quick": 1, "brown": 1, "fox": 1, "jumped": 1,
"over": 1, "the": 1, "lazy": 1, "dog.": 1,
}},
{"I ate a donut. Then I ate another donut.", map[string]int{
"I": 2, "ate": 2, "a": 1, "donut.": 2, "Then": 1, "another": 1,
}},
{"A man a plan a canal panama.", map[string]int{
"A": 1, "man": 1, "a": 2, "plan": 1, "canal": 1, "panama.": 1,
}},
} |
there are basically no instructions on how to install the gotour locally, it is confusing
I had to read http://golang.org/doc/code.html#remote to figure it out
a line like this should be enough
go get github.com/golang/tour/gotour
The text was updated successfully, but these errors were encountered: