INNER CODE UNIT · Go

NewDefaultKusionctlCommandWithArgs

KusionStack/kusion · pkg/cmd/cmd.go:49

func NewDefaultKusionctlCommandWithArgs(o KusionctlOptions) *cobra.Command {
	cmd := NewKusionctlCmd(o)

	if len(o.Arguments) > 1 {
		cmdPathPieces := o.Arguments[1:]
		if _, _, err := cmd.Find(cmdPathPieces); err == nil {
			// sub command exist
			return cmd
		}
	}

	return cmd
}

func NewKusionctlCmd(o KusionctlOptions) *cobra.Command {
	// TODO: optimize the multi-language support.
	// Sending in 'nil' for the getLanguageFn() results in using LANGUAGE, LC_ALL,
	// LC_MESSAGES, or LANG environment variable in sequence.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…