summaryrefslogtreecommitdiff
path: root/xmake/core/base/singleton.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-28 15:46:11 +0800
committerGitHub <[email protected]>2026-03-28 15:46:11 +0800
commit1df5ac2921a800c766fc64d4db6a85975c171e32 (patch)
treefeb30c468c4e89a5c8338b4a90786d97ceed481e /xmake/core/base/singleton.lua
parentc86b161f6b27040289c75f3cafe7a863dea737bc (diff)
parentc08081788e880f32f1835eab49aae5806cb19721 (diff)
Merge pull request #7424 from xmake-io/comments
improve comments
Diffstat (limited to 'xmake/core/base/singleton.lua')
-rw-r--r--xmake/core/base/singleton.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmake/core/base/singleton.lua b/xmake/core/base/singleton.lua
index 92be76664..2b4db4494 100644
--- a/xmake/core/base/singleton.lua
+++ b/xmake/core/base/singleton.lua
@@ -45,6 +45,10 @@ local singleton = singleton or {}
-- return instance
-- end
--
+-- @param key the singleton key (string or function)
+-- @param init the initializer function (optional)
+-- @return the singleton instance, inited (true if already initialized)
+--
function singleton.get(key, init)
-- get key