Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-go / lib / utils / playground.js
1 "use strict";
2 Object.defineProperty(exports, "__esModule", { value: true });
3 exports.openPlayground = void 0;
4 const coc_nvim_1 = require("coc.nvim");
5 const tools_1 = require("./tools");
6 const binaries_1 = require("../binaries");
7 async function openPlayground(document) {
8     return runGoplay(document.getText());
9 }
10 exports.openPlayground = openPlayground;
11 async function runGoplay(code) {
12     try {
13         const stdout = await tools_1.execTool(binaries_1.GOPLAY, ['-'], code);
14         coc_nvim_1.workspace.showMessage(stdout);
15         return true;
16     }
17     catch (err) {
18         coc_nvim_1.workspace.showMessage(`${err}`, "error");
19         return false;
20     }
21 }
22 //# sourceMappingURL=playground.js.map