refactor to use app package instead of service

refactor app to be composable
This commit is contained in:
Robin Olsen
2026-02-28 23:30:31 +01:00
parent ba4d3df669
commit aabce0b0b2
56 changed files with 385 additions and 279 deletions

View File

@@ -1,10 +1,10 @@
package issuesCmd
package issues
import (
"fmt"
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/internal/utils"
"github.com/LazyBachelor/LazyPM/internal/utils/shellcomp"
"github.com/spf13/cobra"
)
@@ -62,9 +62,9 @@ func init() {
UpdateCmd.Flags().StringVarP(&updateFlags.issueType, "type", "t", "", "New issue type(bug, feature, task)")
UpdateCmd.Flags().IntVarP(&updateFlags.priority, "priority", "p", 0, "New issue priority(0-5)")
UpdateCmd.RegisterFlagCompletionFunc("type", utils.CompletionFunc(typeOptions))
UpdateCmd.RegisterFlagCompletionFunc("status", utils.CompletionFunc(statusOptions))
UpdateCmd.RegisterFlagCompletionFunc("priority", utils.CompletionFunc(priorityRange))
UpdateCmd.RegisterFlagCompletionFunc("type", shellcomp.CompletionFunc(typeOptions))
UpdateCmd.RegisterFlagCompletionFunc("status", shellcomp.CompletionFunc(statusOptions))
UpdateCmd.RegisterFlagCompletionFunc("priority", shellcomp.CompletionFunc(priorityRange))
}
func getUpdateValues(cmd *cobra.Command) (map[string]interface{}, error) {