public_host 4 years ago
parent
commit
db6a13bce6
  1. 7
      hasaki-gen-crud/hasaki-gen-crud.js

7
hasaki-gen-crud/hasaki-gen-crud.js

@ -148,22 +148,29 @@ try {
let httpFileName = path.join(fileDir, `auto_generated_http_crud_${underscore_naming}_${struct}_${fileBaseName}`) let httpFileName = path.join(fileDir, `auto_generated_http_crud_${underscore_naming}_${struct}_${fileBaseName}`)
fs.writeFile(crudFileName, `${package_src}\n\n${tmp[2]}`, function () { fs.writeFile(crudFileName, `${package_src}\n\n${tmp[2]}`, function () {
setTimeout(function () {
cp.exec(`gopls fix -a -w ${crudFileName}`, function (a, b, c) { cp.exec(`gopls fix -a -w ${crudFileName}`, function (a, b, c) {
console.log("exec:", a, b, c) console.log("exec:", a, b, c)
}) })
}, 1000)
}) })
fs.writeFile(httpFileName, `${package_src}\n\n${tmp[3]}`, function () { fs.writeFile(httpFileName, `${package_src}\n\n${tmp[3]}`, function () {
setTimeout(function () {
cp.exec(`gopls fix -a -w ${httpFileName}`, function (a, b, c) { cp.exec(`gopls fix -a -w ${httpFileName}`, function (a, b, c) {
console.log("exec:", a, b, c) console.log("exec:", a, b, c)
}) })
}, 1000)
}) })
setTimeout(function () {
cp.exec(`gopls fix -a -w ${fileName}`, function (a, b, c) { cp.exec(`gopls fix -a -w ${fileName}`, function (a, b, c) {
console.log("exec:", a, b, c) console.log("exec:", a, b, c)
}) })
}, 1000)
// vscode.window.showErrorMessage(res) // vscode.window.showErrorMessage(res)
}).catch(error => { }).catch(error => {

Loading…
Cancel
Save