Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/clique.erl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ register_command(Cmd, Keys, Flags, Fun) ->

%% @doc Register usage for a given command sequence. Lookups are by longest
%% match.
-spec register_usage([string()], iolist()) -> true.
-spec register_usage([string()], clique_usage:usage()) -> true.
register_usage(Cmd, Usage) ->
clique_usage:register(Cmd, Usage).

Expand Down
5 changes: 4 additions & 1 deletion src/clique_usage.erl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@

-type err() :: {error, term()}.
-type usage_function() :: fun(() -> iolist()).
-type usage() :: iolist() | usage_function().

-export_type([usage/0]).

%% API
-export([init/0,
Expand All @@ -42,7 +45,7 @@ init() ->

%% @doc Register usage for a given command sequence. Lookups are by longest
%% match.
-spec register([string()], iolist() | usage_function()) -> true.
-spec register([string()], usage()) -> true.
register(Cmd, Usage) ->
ets:insert(?usage_table, {Cmd, Usage}).

Expand Down