aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/verbose/print.go
diff options
context:
space:
mode:
authorOphestra Umiker <cat@ophivana.moe>2024-09-12 21:07:05 +0900
committerOphestra Umiker <cat@ophivana.moe>2024-09-12 21:07:05 +0900
commitda6d238d8a15fa583b384b547decbddcda28ff8b (patch)
treee0f8b1364fa09e5a5ec7a1d0e86d13c475cde3eb /internal/verbose/print.go
parentb0aff891661dfa2f438a7264607a4e6e9caef026 (diff)
verbose: remove system package interaction
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/verbose/print.go')
-rw-r--r--internal/verbose/print.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/verbose/print.go b/internal/verbose/print.go
new file mode 100644
index 00000000..420df2dd
--- /dev/null
+++ b/internal/verbose/print.go
@@ -0,0 +1,15 @@
+package verbose
+
+import "fmt"
+
+func Println(a ...any) {
+ if verbose.Load() {
+ fmt.Println(a...)
+ }
+}
+
+func Printf(format string, a ...any) {
+ if verbose.Load() {
+ fmt.Printf(format, a...)
+ }
+}