This commit is contained in:
Feng Lee 2015-06-11 00:05:44 +08:00
parent c4027dfc16
commit 051b8604e8
1 changed files with 11 additions and 1 deletions

View File

@ -28,7 +28,7 @@
-author("Feng Lee <feng@emqtt.io>").
-export([merge/2]).
-export([merge/2, g/2, g/3]).
%%------------------------------------------------------------------------------
%% @doc Merge Options
@ -50,3 +50,13 @@ merge(Defaults, Options) ->
end
end, Defaults, Options).
%%------------------------------------------------------------------------------
%% @doc Get option
%% @end
%%------------------------------------------------------------------------------
g(Key, Options) ->
proplists:get_value(Key, Options).
g(Key, Options, Default) ->
proplists:get_value(Key, Options, Default).