Skip to content

Commit

Permalink
minor: Specially format sprocs in info/1 output
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Sep 19, 2024
1 parent 56fab72 commit 97040aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/khepri_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

-include_lib("stdlib/include/assert.hrl").

-include_lib("horus/include/horus.hrl").

-include("include/khepri.hrl").
-include("src/khepri_error.hrl").

Expand Down Expand Up @@ -226,6 +228,9 @@ data_prefix(#{child_nodes := _}, _Options) -> "│ ";
data_prefix(_, #{lines := false}) -> " ";
data_prefix(_, _Options) -> " ".

format_data(SProc, _Options) when ?IS_HORUS_FUN(SProc) ->
Fun = horus:to_fun(SProc),
lists:flatten(io_lib:format("SProc: ~tp", [Fun]));
format_data(Data, _Options) ->
lists:flatten(io_lib:format("Data: ~tp", [Data])).

Expand Down

0 comments on commit 97040aa

Please sign in to comment.