<pre class="notranslate">Tokenizer.Raw is intended to provide the unmodified text of the current token --
<a href="http://godoc.org/code.google.com/p/go.net/html#Tokenizer.Raw" rel="nofollow">http://godoc.org/code.google.com/p/go.net/html#Tokenizer.Raw</a>

But, when a tokenization error occurs, the raw text may be duplicated. For example:

    z := NewTokenizer(strings.NewReader("foo  bar"))
    tt := z.Next()
    fmt.Printf("%v: %q\n", tt, string(z.Raw()))
    tt = z.Next()
    fmt.Printf("%v: %q\n", tt, string(z.Raw()))

duplicates "foo  bar" in both a text and error token:

    Text: "foo  bar"
    Error: "foo  bar"

The concatenated results of z.Raw() should reproduce the original input without
duplication.

The fix is adjust the way Next updates the raw and data spans. I'll send a change for
this shortly.</pre>
<p dir="auto">by <strong>xapwing</strong>:</p>
<pre class="notranslate">go version = 1.0.2

windows 7

gopath=c:\dir1;c:\dir2

directory structure:
c:\dir1\src\
           hello\
               hello.go
c:\dir1\bin
c:\dir2\src\
           hello\
               hello.go
c:\dir2\bin

Trigger of the problem:
I run "go install" in either of the "hello" directories

What is the expected output?
  a generated hello.exe in the "bin" directory related to the base dir where the src dir is in

What do you see instead?
   hello.exe is generated in the same "hello" directory as the source hello.go is

Conclusion so far:
   if the same project name occurs in more than one subpaths of a gopath, go install will behave differently and put the .exe file not in the bin but in the src directory

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?


Which version are you using?  (run 'go version')


Please provide any additional information below.</pre>