diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2018-05-20 11:34:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-20 11:34:44 -0400 |
commit | 5170556eaeb987b7d1e0c3b22d94ba84f6ff8a61 (patch) | |
tree | de41fec90d8fc54eedddfbaa39393331b0dad7fa | |
parent | 966ba72f9098ba1034cb26149a85f41dca1c4cef (diff) | |
parent | 1b02e78fae8a50b77a7b68544f00208353a23cb3 (diff) |
Merge pull request #1789 from CrowdHailer/patch-1
Use maps for child spec example
-rw-r--r-- | priv/templates/sup.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/priv/templates/sup.erl b/priv/templates/sup.erl index a2e7209..0db7155 100644 --- a/priv/templates/sup.erl +++ b/priv/templates/sup.erl @@ -26,6 +26,9 @@ start_link() -> %% Supervisor callbacks %%==================================================================== +%% Child :: #{id => Id, start => {M, F, A}} +%% Optional keys are restart, shutdown, type, modules. +%% Before OTP 18 tuples must be used to specify a child. e.g. %% Child :: {Id,StartFunc,Restart,Shutdown,Type,Modules} init([]) -> {ok, { {one_for_all, 0, 1}, []} }. |