From 2b11a4e334f465aef868d6c1bf3f1a7c9dfd5c27 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 4 Nov 2024 05:45:32 -0600 Subject: [PATCH] Sprint() Signed-off-by: Jeff Carr --- original.go | 6 ++++++ reallog.go | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/original.go b/original.go index 6250072..7bd287d 100644 --- a/original.go +++ b/original.go @@ -61,6 +61,12 @@ func Printf(s string, a ...any) { realPrintf(s, a...) } +func Sprint(a ...any) string { + if ! PRINTLN.Ok() { return ""} + if ! PRINTLN.b { return ""} + return realSprint(a...) +} + func Sprintf(s string, a ...any) string { if ! PRINTLN.Ok() { return ""} if ! PRINTLN.b { return ""} diff --git a/reallog.go b/reallog.go index 0f6bc33..9191fa8 100644 --- a/reallog.go +++ b/reallog.go @@ -36,6 +36,10 @@ func realPrintf(s string, a ...any) { } } +func realSprint(a ...any) string { + return fmt.Sprint(a...) +} + func realSprintf(s string, a ...any) string { return fmt.Sprintf(s, a...) }