chore(go): fixing project creation

This commit is contained in:
DarthMooMancer committed 2026-11-18 01:13:55 -05:00
1 parent 1c13c8cbe2
commit 421cf95bc6
2 files changed
+13 -5

No files matched your search

+10 -5
View File
@@ -9,13 +9,18 @@ local M = {}
M.attach = nil M.attach = nil
M.create_project = function(root) M.create_project = function(root)
local root_name = vim.fs.basename(root)
local module_name = "com.DarthMooMancer." .. root_name
local obj = vim local obj = vim
.system({ .system({
"go", "sh",
"mod", "-c",
"init", string.format(
"com.DarthMooMancer." .. vim.fs.basename(root), "go mod init %s && go build -o bin/%s main.go",
}) module_name,
root_name
),
}, { cwd = root })
:wait() :wait()
if obj.code ~= 0 then if obj.code ~= 0 then
vim.notify( vim.notify(
@@ -51,6 +51,9 @@ target
rustc-ice-*.txt rustc-ice-*.txt
#.idea/ #.idea/
]=]), ]=]),
go = vim.trim([=[
bin/
]=]),
} }
local extra = (lang and lang_block[lang]) or "" local extra = (lang and lang_block[lang]) or ""