diff options
| author | ruki <[email protected]> | 2026-03-28 15:46:11 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-03-28 15:46:11 +0800 |
| commit | 1df5ac2921a800c766fc64d4db6a85975c171e32 (patch) | |
| tree | feb30c468c4e89a5c8338b4a90786d97ceed481e /xmake/core/base/singleton.lua | |
| parent | c86b161f6b27040289c75f3cafe7a863dea737bc (diff) | |
| parent | c08081788e880f32f1835eab49aae5806cb19721 (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.lua | 4 |
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 |
