You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
504 B
Lua

---@diagnostic disable: unused-local, undefined-global
return {
-- s("testgo", {
-- t"Hello go snippet"
-- })
-- defer
s("def", fmt([[
defer func(){{
{}
}}()
]],
{
i(0)
})
),
-- defer and handle error from some call
s({trig = "defe", dscr = "defer with error"}, fmt([[
defer func(){{
err := {}
if err != nil {{
{}
}}
}}()
]],
{
i(1),
i(0)
})
),
}