remove setup issues and simplify validaiton

This commit is contained in:
Robin Olsen
2026-03-19 15:21:30 +01:00
parent 64a02a6ed5
commit b0c76b0565
10 changed files with 91 additions and 219 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/internal/utils/shellcomp"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
var updateFlags Flags
@@ -52,6 +53,13 @@ func runUpdateCmd(cmd *cobra.Command, args []string) error {
cmd.Printf("Updated issue to:\n%s", models.IssueString(*updatedIssue))
updateFlags = Flags{}
cmd.Flags().VisitAll(func(f *pflag.Flag) {
f.Changed = false
_ = f.Value.Set(f.DefValue)
})
return nil
}