Vscode Go Test设置

超时时间

vscode 默认超时时间30s,可以自己修改超时时间。

go-test-timeout

禁用缓存

  1. 执行 go test添加 -count=1

    go-test-cache

  2. Go 官方提供 clean工具,来删除对象文件和缓存文件

    go clean -testcache && go test 
    
  3. GO1.11以前版本,可以设置GOCACHE=off

    GOCACHE=off go test
    

最后修改于 2023-02-06

此篇文章的评论功能已经停用。