From 6eb712aec73b6679fe7e2f60e7d1a6607af0ad4a Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Fri, 11 Oct 2024 01:49:11 +0900 Subject: [PATCH] verbose: overridable prefix Signed-off-by: Ophestra Umiker --- internal/verbose/print.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/internal/verbose/print.go b/internal/verbose/print.go index d05c9d7..3d0686b 100644 --- a/internal/verbose/print.go +++ b/internal/verbose/print.go @@ -1,17 +1,19 @@ package verbose -import "fmt" +import ( + "fmt" +) -const prefix = "fortify:" +var Prefix = "fortify:" func Println(a ...any) { if verbose.Load() { - fmt.Println(append([]any{prefix}, a...)...) + fmt.Println(append([]any{Prefix}, a...)...) } } func Printf(format string, a ...any) { if verbose.Load() { - fmt.Printf(prefix+" "+format, a...) + fmt.Printf(Prefix+" "+format, a...) } }