美文网首页
12 go run *.go

12 go run *.go

作者: 滔滔逐浪 | 来源:发表于2023-10-22 17:18 被阅读0次

Linux中的go项目,可以使用go run *.go运行当前文件夹下的所有go文件。

但是同样的代码在Windows中中运行时,提示错误:

CreateFile *.go: The filename, directory name, or volume label syntax is inc

方案
在Windows中使用命令[go run ./]等同于[go run *.go]

相关文章

网友评论

      本文标题:12 go run *.go

      本文链接:https://www.haomeiwen.com/subject/fzfdidtx.html