2020-07-12 02:23:07 +08:00
|
|
|
## 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
|
|
|
##
|
2023-11-22 12:18:22 +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
|
2017-05-23 00:14:26 +08:00
|
|
|
[format_output(Enum.to_list(stream), options)]
|
2016-12-07 20:42:48 +08:00
|
|
|
end
|
|
|
|
end
|