mirror of
https://github.com/holos-run/holos.git
synced 2026-04-07 10:04:57 +00:00
This command reads Component objects from a reader, exports a BuildPlan from CUE, then marshals the result to the writer. The purpose is to run concurrent instances of CUE to speed up build plan generation prior to task execution.
27 lines
555 B
Go
27 lines
555 B
Go
package command
|
|
|
|
import (
|
|
"github.com/holos-run/holos/version"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// RunFunc is a cobra.Command RunE function.
|
|
type RunFunc func(c *cobra.Command, args []string) error
|
|
|
|
// New returns a new subcommand
|
|
func New(name string) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: name,
|
|
Short: name,
|
|
Version: version.GetVersion(),
|
|
Args: cobra.NoArgs,
|
|
CompletionOptions: cobra.CompletionOptions{
|
|
HiddenDefaultCmd: true,
|
|
},
|
|
SilenceUsage: true,
|
|
SilenceErrors: true,
|
|
}
|
|
cmd.Flags().SortFlags = false
|
|
return cmd
|
|
}
|