-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package mod | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
"k8s.io/cli-runtime/pkg/genericclioptions" | ||
|
||
cmdutil "kusionstack.io/kusion/pkg/cmd/util" | ||
"kusionstack.io/kusion/pkg/util/i18n" | ||
) | ||
|
||
var modLong = i18n.T(` | ||
Commands for managing Kusion modules. | ||
These commands help you manage the lifecycle of Kusion modules.`) | ||
|
||
// NewCmdMod returns an initialized Command instance for 'mod' sub command | ||
func NewCmdMod(streams genericclioptions.IOStreams) *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "mod SUBCOMMAND", | ||
DisableFlagsInUseLine: true, | ||
Short: "Manage Kusion modules", | ||
Long: modLong, | ||
Run: cmdutil.DefaultSubCommandRun(streams.ErrOut), | ||
} | ||
|
||
// add subcommands | ||
cmd.AddCommand(NewCmdInit(streams)) | ||
cmd.AddCommand(NewCmdPush(streams)) | ||
|
||
return cmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package mod | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
"k8s.io/cli-runtime/pkg/genericclioptions" | ||
) | ||
|
||
type InitModOptions struct{} | ||
|
||
var ( | ||
initLong = `` | ||
initExample = `` | ||
) | ||
|
||
// NewCmdInit returns an initialized Command instance for the 'mod init' sub command | ||
func NewCmdInit(streams genericclioptions.IOStreams) *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "", | ||
DisableFlagsInUseLine: true, | ||
Short: "", | ||
Long: initLong, | ||
Example: initExample, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
}, | ||
} | ||
|
||
return cmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package mod | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
"k8s.io/cli-runtime/pkg/genericclioptions" | ||
) | ||
|
||
type PushModOptions struct{} | ||
|
||
var ( | ||
pushLong = `` | ||
pushExample = `` | ||
) | ||
|
||
// NewCmdPush returns an initialized Command instance for the 'mod push' sub command | ||
func NewCmdPush(streams genericclioptions.IOStreams) *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "", | ||
DisableFlagsInUseLine: true, | ||
Short: "", | ||
Long: pushLong, | ||
Example: pushExample, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
}, | ||
} | ||
|
||
return cmd | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters