Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
blylei committed Jan 13, 2023
1 parent 21a7ef8 commit 493484c
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 0 deletions.
File renamed without changes.
90 changes: 90 additions & 0 deletions admin/cmd/plugin.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/*
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
*/
package cmd

import (
"fmt"
"github.com/spf13/cobra"
)

// pluginCmd represents the plugin command
var pluginCmd = &cobra.Command{
Use: "plugin",
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.`,
}

// listCmd represents the plugin command
var listCmd = &cobra.Command{
Use: "list",
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.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("standalone called")
},
}

// listCmd represents the plugin command
var installCmd = &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.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("standalone called")
},
}

// listCmd represents the plugin command
var uninstallCmd = &cobra.Command{
Use: "uninstall",
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.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("standalone called")
},
}

// listCmd represents the plugin command
var updateCmd = &cobra.Command{
Use: "update",
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.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("standalone called")
},
}

func init() {
rootCmd.AddCommand(pluginCmd)
pluginCmd.AddCommand(listCmd)
pluginCmd.AddCommand(installCmd)
pluginCmd.AddCommand(uninstallCmd)
pluginCmd.AddCommand(updateCmd)
// pluginCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 493484c

Please sign in to comment.