add descriptive comment to variour commands

move completions to its own class
This commit is contained in:
Robin Olsen
2026-02-07 12:15:09 +01:00
parent 9baedea9b5
commit 6bf8b76aab
5 changed files with 82 additions and 52 deletions

View File

@@ -7,8 +7,10 @@ import (
"github.com/LazyBachelor/LazyPM/pkg/cli/commands"
)
// CLIConfig is an alias for service.Config, which contains all the necessary
type CLIConfig = service.Config
// Run initializes the services and executes the CLI commands.
func Run(ctx context.Context, config CLIConfig) error {
svc, cleanup, err := service.NewServices(ctx, config)
if err != nil {
@@ -26,6 +28,7 @@ func Run(ctx context.Context, config CLIConfig) error {
return nil
}
// RunWithArgs initializes the services and executes the CLI commands with the provided arguments.
func RunWithArgs(ctx context.Context, config CLIConfig, args []string) error {
svc, cleanup, err := service.NewServices(ctx, config)
if err != nil {