github.com/vishnupahwa/lakctl@v0.0.2-alpha/cmd/commands/options/run.go (about)

     1  package options
     2  
     3  import "github.com/spf13/cobra"
     4  
     5  // Run struct contains options regarding the main command to be controlled.
     6  type Run struct {
     7  	Command string
     8  }
     9  
    10  func AddRunArg(cmd *cobra.Command, r *Run) {
    11  	cmd.Flags().StringVarP(&r.Command, "run", "r", "", "Run command to start")
    12  	_ = cmd.MarkFlagRequired("run")
    13  }