30 lines
487 B
Go
30 lines
487 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var rootCmd = &cobra.Command{
|
|
Use: "train",
|
|
Short: "Train - легковесный пакетный менеджер",
|
|
}
|
|
|
|
func Execute() {
|
|
if err := rootCmd.Execute(); err != nil {
|
|
fmt.Println(err)
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(installCmd)
|
|
rootCmd.AddCommand(removeCmd)
|
|
rootCmd.AddCommand(updateCmd)
|
|
rootCmd.AddCommand(listCmd)
|
|
rootCmd.AddCommand(infoCmd)
|
|
rootCmd.AddCommand(repoCmd)
|
|
}
|