rabbitmq-server/deps/rabbitmq_cli/lib/rabbitmq/cli/formatters/erlang.ex

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
644 B
Elixir
Raw Normal View History

## This Source Code Form is subject to the terms of the Mozilla Public
## License, v. 2.0. If a copy of the MPL was not distributed with this
## file, You can obtain one at https://mozilla.org/MPL/2.0/.
2016-11-10 20:19:47 +08:00
##
## Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
2016-11-10 20:19:47 +08:00
defmodule RabbitMQ.CLI.Formatters.Erlang do
2016-11-15 01:52:08 +08:00
@behaviour RabbitMQ.CLI.FormatterBehaviour
2016-11-10 20:19:47 +08:00
def format_output(output, _) do
:io_lib.format("~p", [output])
|> to_string
end
def format_stream(stream, options) do
[format_output(Enum.to_list(stream), options)]
end
end