PlaceCompilerCommands 替换编译命令集
(configFile string)
| 87 | |
| 88 | // PlaceCompilerCommands 替换编译命令集 |
| 89 | func PlaceCompilerCommands(configFile string) error { |
| 90 | if configFile != "" { |
| 91 | _, err := os.Stat(configFile) |
| 92 | // ignore |
| 93 | if os.IsNotExist(err) { |
| 94 | return nil |
| 95 | } |
| 96 | cbody, err := ioutil.ReadFile(configFile) |
| 97 | if err != nil { |
| 98 | return err |
| 99 | } |
| 100 | err = json.Unmarshal(cbody, &CompileCommands) |
| 101 | if err != nil { |
| 102 | return err |
| 103 | } |
| 104 | } |
| 105 | return nil |
| 106 | } |
| 107 | |
| 108 | // 初始化文件 |
| 109 | func (prov *CodeCompileProvider) initFiles(codeExt string, programExt string) error { |
no outgoing calls
no test coverage detected