refactor(installer): automatically install gotests@develop

This commit is contained in:
Oleksandr Smirnov 2025-03-20 14:07:10 +02:00
parent 55bc5787d1
commit 439ae3021c
No known key found for this signature in database

View file

@ -5,10 +5,10 @@ local log = require "gopher._utils.log"
local installer = {} local installer = {}
local urls = { local urls = {
gomodifytags = "github.com/fatih/gomodifytags", gomodifytags = "github.com/fatih/gomodifytags@latest",
impl = "github.com/josharian/impl", impl = "github.com/josharian/impl@latest",
gotests = "github.com/cweill/gotests/...", gotests = "github.com/cweill/gotests/...@develop",
iferr = "github.com/koron/iferr", iferr = "github.com/koron/iferr@latest",
} }
---@param opt vim.SystemCompleted ---@param opt vim.SystemCompleted
@ -40,8 +40,7 @@ end
---@param opts? {sync:boolean} ---@param opts? {sync:boolean}
function installer.install_deps(opts) function installer.install_deps(opts)
opts = opts or {} opts = opts or {}
for pkg, _ in pairs(urls) do for url, _ in pairs(urls) do
local url = urls[pkg] .. "@latest"
if opts.sync then if opts.sync then
install_sync(url) install_sync(url)
else else