g/2, g/3
This commit is contained in:
parent
c4027dfc16
commit
051b8604e8
|
@ -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).
|
||||
|
||||
|
|
Loading…
Reference in New Issue