Skip to content
Snippets Groups Projects
root.go 769 B
Newer Older
  • Learn to ignore specific revisions
  • package nucleus
    
    import (
    	"fmt"
    	"github.com/spf13/cobra"
    	"os"
    )
    
    
    func init() {
    	rootCmd.AddCommand(versionCmd)
    }
    
    var versionCmd = &cobra.Command{
      Use:   "version",
    
      Short: "Print the version number of goSDN",
    
      Long:  `A version is a version.`,
      Run: func(cmd *cobra.Command, args []string) {
        fmt.Println("Beachead -- unkown HEAD")
      },
    }
    
    var rootCmd = &cobra.Command{
    
    	Short: "A yet still incomplete attempt to build an network operating system, but...:-)",
    	Long: "Incomplete network operating system. Complete documentation is available at XXX",
    	Run: func(cmd *cobra.Command, args []string) {
    		// Do Stuff Here
    
    	},
    }
    
    func Execute() {
    	if err := rootCmd.Execute(); err != nil {
    	fmt.Println(err)
    	os.Exit(1)
    	}
    }