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

18 lines
426 B

-- Utility functions module for auto-boot-ollama-host
-- Provides logging and other utility functions
local utils = {}
-- Logging function with timestamp
function utils.log(msg)
io.stdout:write(os.date("[%F %T] "), msg, "\n")
io.stdout:flush()
end
-- Get environment variable with default value
function utils.getenv(name, def)
local v = os.getenv(name)
return (v ~= nil and v ~= "") and v or def
end
return utils