This is an automated email from the ASF dual-hosted git repository.
zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-kubernetes.git
The following commit(s) were added to refs/heads/master by this push:
new 9c09d20c [dubboctl] initial repo logic (#554)
9c09d20c is described below
commit 9c09d20cbd0de62c5b8f3cd38ac369696adc6318
Author: Jian Zhong <[email protected]>
AuthorDate: Mon Jan 20 19:49:21 2025 +0800
[dubboctl] initial repo logic (#554)
---
dubboctl/cmd/create.go | 4 ++++
dubboctl/cmd/repo.go | 34 ++++++++++++++++++++++++++++++++--
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/dubboctl/cmd/create.go b/dubboctl/cmd/create.go
index 79c4eeaa..b9fefb98 100644
--- a/dubboctl/cmd/create.go
+++ b/dubboctl/cmd/create.go
@@ -61,11 +61,15 @@ func sdkGenerateCmd(cmd *cobra.Command, clientFactory
ClientFactory) *cobra.Comm
dubboctl create sdk --language java --template common --dirname mydubbo
dubboctl create sdk -l java -t common -d mydubbo
+
+ dubboctl create sdk -l java -t common -d myrepo/mydubbo
# Create a go sample sdk.
dubboctl create sdk --language go --template common --dirname mydubbogo
dubboctl create sdk -l go -t common -d mydubbogo
+
+ dubboctl create sdk -l go -t common -d myrepo/mydubbogo
`,
PreRunE: bindEnv("language", "template", "dirname"),
RunE: func(cmd *cobra.Command, args []string) error {
diff --git a/dubboctl/cmd/repo.go b/dubboctl/cmd/repo.go
index 92951256..39db9bfd 100644
--- a/dubboctl/cmd/repo.go
+++ b/dubboctl/cmd/repo.go
@@ -17,13 +17,43 @@ func RepoCmd(_ cli.Context, cmd *cobra.Command,
clientFactory ClientFactory) *co
rArgs := &repoArgs{}
rc := &cobra.Command{
Use: "repo",
- Short: "",
- Long: "",
+ Short: "Manage existing Dubbo SDK module libraries",
+ Long: "The repo command Manage existing Dubbo SDK module
libraries",
+ Example: ` # Add a new template library.
+ dubboctl repo add [name] [URL]
+
+ # View the list of template library.
+ dubboctl repo list
+
+ # Remove an existing template library.
+ dubboctl repo remove [name]
+`,
RunE: func(cmd *cobra.Command, args []string) error {
return nil
},
}
cluster.AddFlags(rc, rootArgs)
addRepoFlags(rc, rArgs)
+ rc.AddCommand(newRepoAdd(clientFactory))
+ rc.AddCommand(newRepoList(clientFactory))
+ rc.AddCommand(newRepoRemove(clientFactory))
return rc
}
+
+func runRepo() {
+
+}
+
+func newRepoAdd(clientFactory ClientFactory) *cobra.Command {
+ return nil
+
+}
+
+func newRepoList(clientFactory ClientFactory) *cobra.Command {
+ return nil
+
+}
+
+func newRepoRemove(clientFactory ClientFactory) *cobra.Command {
+ return nil
+}