<p dir="auto">Hi, i'm running gofmt on every save and observed something odd after running it on my code:</p>
<div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package test

func F1(s string, path string, config Config) string {
        r2 := regexp.MustCompile(&quot;http://(asset-[^.].)&quot; + replaceString)
        return s
}

func F2(s string, path string, config Config) string {
        r := regexp.MustCompile(&quot;https?://([^ '\&quot;]*)bla.foo&quot;)
        s = r.ReplaceAllString(s, &quot;http://${1}&quot;+replaceString)
        return s
}"><pre class="notranslate"><span class="pl-k">package</span> test

<span class="pl-k">func</span> <span class="pl-en">F1</span>(<span class="pl-s1">s</span> <span class="pl-smi">string</span>, <span class="pl-s1">path</span> <span class="pl-smi">string</span>, <span class="pl-s1">config</span> <span class="pl-smi">Config</span>) <span class="pl-smi">string</span> {
        <span class="pl-s1">r2</span> <span class="pl-c1">:=</span> <span class="pl-s1">regexp</span>.<span class="pl-en">MustCompile</span>(<span class="pl-s">"http://(asset-[^.].)"</span> <span class="pl-c1">+</span> <span class="pl-s1">replaceString</span>)
        <span class="pl-k">return</span> <span class="pl-s1">s</span>
}

<span class="pl-k">func</span> <span class="pl-en">F2</span>(<span class="pl-s1">s</span> <span class="pl-smi">string</span>, <span class="pl-s1">path</span> <span class="pl-smi">string</span>, <span class="pl-s1">config</span> <span class="pl-smi">Config</span>) <span class="pl-smi">string</span> {
        <span class="pl-s1">r</span> <span class="pl-c1">:=</span> <span class="pl-s1">regexp</span>.<span class="pl-en">MustCompile</span>(<span class="pl-s">"https?://([^ '<span class="pl-cce">\"</span>]*)bla.foo"</span>)
        <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">r</span>.<span class="pl-en">ReplaceAllString</span>(<span class="pl-s1">s</span>, <span class="pl-s">"http://${1}"</span><span class="pl-c1">+</span><span class="pl-s1">replaceString</span>)
        <span class="pl-k">return</span> <span class="pl-s1">s</span>
}</pre></div>
<p dir="auto">Why is there a space around "+" in the first func and no space around "+" in the second?</p>
<p dir="auto">by <strong>zippoxer</strong>:</p>
<pre class="notranslate">Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull", "hg update default", rebuild, and
retry
what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1. Installing gomingw installer for build of release r60.1
2. Running goinstall.exe, even with no parameters.

What is the expected output?
You know that ;-)

What do you see instead?
throw: runtime: cannot reserve arena virtual address space

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

Which operating system are you using?
Windows 7

Which revision are you using?  (hg identify)
I ran "Installer for Win32 (experimental) build of release.r60.1"
(hd identify doesn't cooperate, sorry)

Please provide any additional information below.</pre>