-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.go
More file actions
37 lines (30 loc) · 807 Bytes
/
install.go
File metadata and controls
37 lines (30 loc) · 807 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
/*
Copyright © 2025 Codesphere Inc.
*/
package cli
import (
"fmt"
"github.com/spf13/cobra"
)
type Install struct {
cmd *cobra.Command
}
func (i *Install) Run(_ *cobra.Command, args []string) {
fmt.Println("install called")
}
func addInstallCmd(rootCmd *cobra.Command) {
install := Install{
cmd: &cobra.Command{
Use: "install",
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.`,
},
}
install.cmd.Run = install.Run
addInstallCodesphereCmd(install.cmd)
rootCmd.AddCommand(install.cmd)
}