🚧 Start setting up cobra commands
This commit is contained in:
parent
c67e970b2f
commit
6c90679130
4 changed files with 49 additions and 5 deletions
24
commands/root.go
Normal file
24
commands/root.go
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "gopub",
|
||||
Short: "gopub is a single-user ActivityPub instance",
|
||||
Long: "...",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("Run a sub-command")
|
||||
},
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
Reference in a new issue