<p>Whenever I run <code>go test -bench=.</code> on windows, the command is run in a new window and closes itself before I can see the output. This is pretty frustrating and searching online hasn't yielded anything.</p>
<p>Any ideas would be appreciated!</p>
<hr/>**评论:**<br/><br/>shovelpost: <pre><blockquote>
<p>Whenever I run go test -bench=. on windows, the command is run in a new window and closes itself before I can see the output.</p>
</blockquote>
<ul>
<li>winkey+R</li>
<li>type <code>cmd</code> press enter</li>
<li><code>cd %GOPATH%\src\your\code</code></li>
<li><code>go test -bench=.</code></li>
</ul>
<p>Alternatively you could use Powershell or VSCode which has an embedded command line window (opens with ctrl+`).</p></pre>villiger2: <pre><p>Thanks so much, that worked perfectly. I was trying to use PowerShell but it kept opening a new terminal window to run the benchmarks, then closing it automatically after the benchmark had finished so I couldn't see the result.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传