aboutsummaryrefslogtreecommitdiff
path: root/internal/cli/log.go
diff options
context:
space:
mode:
authortsne <tsne.dev@outlook.com>2026-07-06 16:52:20 +0200
committertsne <tsne.dev@outlook.com>2026-07-06 19:21:15 +0200
commit2c41acab4c97f584e8e199b31dc456194b8d7e6c (patch)
tree42381deb6c4f6da0f32945432207a31b4d86664e /internal/cli/log.go
downloadhopper-2c41acab4c97f584e8e199b31dc456194b8d7e6c.tar.gz
initial
Diffstat (limited to 'internal/cli/log.go')
-rw-r--r--internal/cli/log.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/cli/log.go b/internal/cli/log.go
new file mode 100644
index 0000000..c837649
--- /dev/null
+++ b/internal/cli/log.go
@@ -0,0 +1,22 @@
+package cli
+
+import (
+ "tsne.dev/hopper/internal/log"
+)
+
+// logAction prints a per-action line.
+// In dry-run mode the line is prefixed with "[dryrun] ".
+func logAction(format string, args ...any) {
+ if dryRun {
+ format = "[dryrun] " + format
+ }
+ log.Print(format, args...)
+}
+
+// logSummary prints the final summary line.
+func logSummary(format string, args ...any) {
+ if dryRun {
+ format += "\n\nNote: This was a dry run. Nothing on the zone was modified."
+ }
+ log.PrintImportant(format, args...)
+}