using Cobra for cli stuff
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "drogobox",
|
||||
Short: "DroGoBox is just a dumb project",
|
||||
Long: `DroGoBox is just a dumb project
|
||||
an alternative to Nextcloud written with Go
|
||||
so that I can learn Go. Don't trust it for production.
|
||||
Maybe one day, but that day is not today.`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
// Do stuff here
|
||||
},
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
//
|
||||
}
|
||||
Reference in New Issue
Block a user