-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlist-codesphere.go
More file actions
39 lines (33 loc) · 1014 Bytes
/
list-codesphere.go
File metadata and controls
39 lines (33 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
Copyright © 2025 Codesphere Inc.
*/
package cli
import (
"fmt"
cs "github.com/codesphere-cloud/oms/pkg/codesphere"
"github.com/spf13/cobra"
)
type ListCodesphere struct {
cmd *cobra.Command
Codesphere cs.Codesphere
}
func (l *ListCodesphere) Run(_ *cobra.Command, args []string) {
fmt.Println("list codesphere called")
fmt.Println(l.Codesphere)
}
func addListCodesphereCmd(listCmd *cobra.Command) {
listCodesphere := ListCodesphere{
cmd: &cobra.Command{
Use: "codesphere",
Short: "A brief description of your command",
Long: `A longer description that spans multiple lines and likely contains examples
and usage of using your command. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
},
}
listCodesphere.cmd.Run = listCodesphere.Run
ParseCodesphereFlags(&listCodesphere.Codesphere, listCodesphere.cmd)
listCmd.AddCommand(listCodesphere.cmd)
}