fixed indentation

This commit is contained in:
2025-08-06 17:41:26 +03:00
parent 9372411853
commit d328b5caae

View File

@@ -1,28 +1,28 @@
local M = {}
function M.setup(module, opts)
local instance = nil
local instance = nil
local function setup()
if instance == nil then
instance = require(module)
if instance.setup then
instance.setup(opts or {})
local function setup()
if instance == nil then
instance = require(module)
if instance.setup then
instance.setup(opts or {})
end
end
end
end
end
return setmetatable({}, {
__index = function(_, key)
setup()
return instance[key]
end,
return setmetatable({}, {
__index = function(_, key)
setup()
return instance[key]
end,
__call = function(_, ...)
setup()
return instance(...)
end,
})
__call = function(_, ...)
setup()
return instance(...)
end,
})
end
return M