Tools -> Build System -> New Build System
输入如下代码:
{
"cmd" : [ "/usr/local/go/bin/go" , "run" , "$file" ],
"file_regex" : "^(...*?):([0-9]*):?([0-9]*)" ,
"working_dir" : "${file_path}" ,
"selector" : "source.go"
}
然后选择Build的文件:go
然后Command + B 就有输出了。