Skip to content

Commit

Permalink
fix: log tables using linebreaks and tabs for easier reading
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Aug 7, 2024
1 parent 8a8fd65 commit 66e99e3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lua/neotest-golang/logging.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ local function clean_output(str)
return str
end

local function table_to_string(tbl)
local result = vim.inspect(tbl)
return clean_output(result)
end

---@param input any
---@return string
local function handle_input(input)
Expand All @@ -27,7 +22,7 @@ local function handle_input(input)
local result = ""
for _, v in ipairs(input) do
if type(v) == "table" then
result = result .. table_to_string(v) .. " "
result = result .. vim.inspect(v) .. " "
elseif type(v) == "string" then
result = result .. clean_output(v) .. " "
else
Expand Down

0 comments on commit 66e99e3

Please sign in to comment.