通过bat创建go项目

快速验证时使用

主要是有时候想快速验证xxx思路或者算法的时候,vscode必须先创建一个main.go,再在命令行init它。比较麻烦,不如直接写个bat一步搞定。

BAT (Batchfile)
SET filename=main.go

echo. > %filename%

go mod init main.go

本来还想顺便初始化个hello world,但是bat对“将标点符号写入文件”的这个功能,貌似不太支持。

Subscribe
提醒
0 评论
Inline Feedbacks
View all comments
0
在此留下你的评论x