From 90b865fd48deeaca4f07511ba67c27dacd19d91f Mon Sep 17 00:00:00 2001 From: Kevin Lyda <kevin@lyda.ie> Date: Sun, 25 May 2025 14:25:44 +0100 Subject: [PATCH] Only emit a todo if the flag is set --- repl/messages.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/repl/messages.go b/repl/messages.go index 3bb4152..16d2027 100644 --- a/repl/messages.go +++ b/repl/messages.go @@ -75,14 +75,20 @@ func ActionAdd(cmd *dclish.Command) error { if cmd.Flags["/ALL"].Value == "true" { optAll = 1 + } + if cmd.Flags["/ALL"].Set { fmt.Printf("TODO: optAll is not yet implemented - you set it to %d\n", optAll) } if cmd.Flags["/BELL"].Value == "true" { optBell = 1 + } + if cmd.Flags["/BELL"].Set { fmt.Printf("TODO: optBell is not yet implemented - you set it to %d\n", optBell) } if cmd.Flags["/BROADCAST"].Value == "true" { optBroadcast = 1 + } + if cmd.Flags["/BROADCAST"].Set { fmt.Printf("TODO: optBroadcast is not yet implemented - you set it to %d\n", optBroadcast) } if cmd.Flags["/EXPIRATION"].Value != "" { @@ -101,6 +107,8 @@ func ActionAdd(cmd *dclish.Command) error { } if cmd.Flags["/EXTRACT"].Value == "true" { optExtract = 1 + } + if cmd.Flags["/EXTRACT"].Set { fmt.Printf("TODO: optExtract is not yet implemented - you set it to %d\n", optExtract) } if cmd.Flags["/FOLDER"].Value != "" { @@ -108,6 +116,8 @@ func ActionAdd(cmd *dclish.Command) error { } if cmd.Flags["/INDENT"].Value == "true" { optIndent = 1 + } + if cmd.Flags["/INDENT"].Set { fmt.Printf("TODO: optIndent is not yet implemented - you set it to %d\n", optIndent) } if cmd.Flags["/PERMANENT"].Value == "true" { @@ -118,6 +128,8 @@ func ActionAdd(cmd *dclish.Command) error { } if cmd.Flags["/SIGNATURE"].Value == "true" { optSignature = 1 + } + if cmd.Flags["/SIGNATURE"].Set { fmt.Printf("TODO: optSignature is not yet implemented - you set it to %d\n", optSignature) } if cmd.Flags["/SUBJECT"].Value != "" { @@ -125,6 +137,8 @@ func ActionAdd(cmd *dclish.Command) error { } if cmd.Flags["/SYSTEM"].Value == "true" { optSystem = 1 + } + if cmd.Flags["/SYSTEM"].Set { fmt.Printf("TODO: optSystem is not yet implemented - you set it to %d\n", optSystem) } -- GitLab