Go文件右键编译

辛辛苦苦写好了.go文件 发现编译还得敲命令才行,或许配置一个好用点的IDE环境能够解决shell

可是有时候实在不想开IDE 因而在右键添加了一个编译功能ui

首先保证go相关的环境变量配置正确spa

1 Windows Registry Editor Version 5.00
2 
3 [HKEY_CLASSES_ROOT\*\shell\Build With Go\command]
4 @="cmd.exe /k \"go build %1 && echo ok\""

而后保存代码到reg文件 而后执行 合并到注册表code

这样全部文件的右键将会多出一个 go build 菜单命令blog

单独给go文件增长的菜单cmd

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\go_auto_file\shell\Build With Go ]

[HKEY_CLASSES_ROOT\go_auto_file\shell\Build With Go \command]
@="cmd.exe /k \"go build %1 && echo ok\""

[HKEY_CLASSES_ROOT\go_auto_file\shell\Build With Go \ddeexec]
相关文章
相关标签/搜索