add descriptive comment to variour commands
move completions to its own class
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user