From 08d8cb8eb2f7a636b2c8384283d134b931d0bc77 Mon Sep 17 00:00:00 2001 From: DEV Date: Wed, 27 Mar 2024 23:08:48 +0100 Subject: [PATCH] =?UTF-8?q?a=C3=B1adido=20la=20capacidad=20de=20visualizar?= =?UTF-8?q?los=20con=20colores?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/errs/fmt_text.go | 2 +- core/errs/fmt_text_att.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/errs/fmt_text.go b/core/errs/fmt_text.go index 9409188..ccbd57d 100644 --- a/core/errs/fmt_text.go +++ b/core/errs/fmt_text.go @@ -51,7 +51,7 @@ type ( func NewFmtText(options ...FmtTextFnc) *FmtText { return applyFmtTextOptions(&FmtText{ - FmtTextAtt: FmtTextAttIndent | FmtTextAttVerbose | FmtTextAttTrace, + FmtTextAtt: FmtTextAttIndent | FmtTextAttVerbose | FmtTextAttTrace | FmtTextAttColors, indent : " ", traceFmt : formatStackTrace , }, options...) } diff --git a/core/errs/fmt_text_att.go b/core/errs/fmt_text_att.go index 909a290..438b167 100644 --- a/core/errs/fmt_text_att.go +++ b/core/errs/fmt_text_att.go @@ -30,6 +30,7 @@ const( FmtTextAttEmpty FmtTextAttIndent FmtTextAttTrace + FmtTextAttColors ) @@ -52,4 +53,7 @@ func (a FmtTextAtt) UseIndent () bool { return a&FmtTextAttIndent != 0 } func (a FmtTextAtt) AddStackTrace () bool { - return a&FmtTextAttTrace != 0 } \ No newline at end of file + return a&FmtTextAttTrace != 0 } + +func (a FmtTextAtt) UseColors () bool { + return a&FmtTextAttColors != 0 } \ No newline at end of file