Current section
Files
Jump to
Current section
Files
src/go_over@util@print.erl
-module(go_over@util@print).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([raw/2, progress/2, format_warning/1, format_critical/1, format_high/1, format_moderate/1, format_low/1, warning/1, high/1, success/1]).
-file("/home/bwireman/src/go-over/src/go_over/util/print.gleam", 5).
-spec raw(binary(), binary()) -> binary().
raw(Msg, Color) ->
shellout:style(Msg, shellout:color([Color]), []).
-file("/home/bwireman/src/go-over/src/go_over/util/print.gleam", 9).
-spec progress(boolean(), binary()) -> nil.
progress(Verbose, Msg) ->
gxyz@function:iff_nil(
Verbose,
fun() ->
_pipe = shellout:style(
Msg,
shellout:color([<<"brightmagenta"/utf8>>]),
[]
),
gleam_stdlib:println(_pipe)
end
).
-file("/home/bwireman/src/go-over/src/go_over/util/print.gleam", 16).
-spec format_warning(binary()) -> binary().
format_warning(Msg) ->
shellout:style(
<<Msg/binary, "\n"/utf8>>,
shellout:color([<<"red"/utf8>>]),
[]
).
-file("/home/bwireman/src/go-over/src/go_over/util/print.gleam", 20).
-spec format_critical(binary()) -> binary().
format_critical(Msg) ->
format_warning(Msg).
-file("/home/bwireman/src/go-over/src/go_over/util/print.gleam", 24).
-spec format_high(binary()) -> binary().
format_high(Msg) ->
shellout:style(
<<Msg/binary, "\n"/utf8>>,
shellout:color([<<"yellow"/utf8>>]),
[]
).
-file("/home/bwireman/src/go-over/src/go_over/util/print.gleam", 28).
-spec format_moderate(binary()) -> binary().
format_moderate(Msg) ->
shellout:style(
<<Msg/binary, "\n"/utf8>>,
shellout:color([<<"blue"/utf8>>]),
[]
).
-file("/home/bwireman/src/go-over/src/go_over/util/print.gleam", 32).
-spec format_low(binary()) -> binary().
format_low(Msg) ->
shellout:style(
<<Msg/binary, "\n"/utf8>>,
shellout:color([<<"cyan"/utf8>>]),
[]
).
-file("/home/bwireman/src/go-over/src/go_over/util/print.gleam", 36).
-spec warning(binary()) -> nil.
warning(Msg) ->
_pipe = Msg,
_pipe@1 = format_warning(_pipe),
gleam_stdlib:println(_pipe@1).
-file("/home/bwireman/src/go-over/src/go_over/util/print.gleam", 42).
-spec high(binary()) -> nil.
high(Msg) ->
_pipe = Msg,
_pipe@1 = format_high(_pipe),
gleam_stdlib:println(_pipe@1).
-file("/home/bwireman/src/go-over/src/go_over/util/print.gleam", 48).
-spec success(binary()) -> nil.
success(Msg) ->
_pipe = shellout:style(Msg, shellout:color([<<"brightgreen"/utf8>>]), []),
gleam_stdlib:println(_pipe).