From 4b675e4801d02cf760bd27cc118bce124ea67fbb Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 25 May 2026 14:55:40 +0530 Subject: [PATCH] fix: remove duplicate status check and add missing port flag description in start command - Removed duplicate 'Running' status check that was already handled by the switch statement below - Added missing description for --port flag so users understand what the flag does Signed-off-by: Aditya --- cmd/start.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd/start.go b/cmd/start.go index 80446039..24f78892 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -47,11 +47,7 @@ microcks start --name [name of you container/instance]`, instance = &config.Instance{} } - if instance.Status == "Running" { - fmt.Printf("Microcks instance with name %s is already running", name) - return - } - + switch instance.Status { case "Running": fmt.Printf("Microcks instance with name %s is already running", name) @@ -144,7 +140,7 @@ microcks start --name [name of you container/instance]`, }, } startCmd.Flags().StringVar(&name, "name", "microcks", "name for you microcks instance") - startCmd.Flags().StringVar(&hostPort, "port", "8585", "") + startCmd.Flags().StringVar(&hostPort, "port", "8585", "Host port to expose the Microcks instance (default: 8585)") startCmd.Flags().StringVar(&imageName, "image", "quay.io/microcks/microcks-uber:latest-native", "image which will be used to create a container") startCmd.Flags().BoolVar(&autoRemove, "rm", false, "mimic of '--rm' flag of dokcer to automatically remove the container when it exits") startCmd.Flags().StringVar(&driver, "driver", "docker", "use --driver to change driver from docker to podman")