123456789101112131415161718192021222324 |
- package command
- import (
- "fmt"
- "github.com/spf13/cobra"
- )
- var ServeCommand = &cobra.Command{
- Use: "server",
- Short: "Run the kurz server",
- Long: fmt.Printf("Run the kurz server, using the configuration in ~/%s", ConfigName),
- Run: serveCommand,
- }
- func serveCommand(c *cobra.Command, args []string) {
- fmt.Println("Pretend to serve kurz.")
- }
- var servePort int
- func init() {
- ServeCommand.Flags().IntVarP(&servePort, "port", "p", 80, "The IP port on which to listen")
- kurz.AddCommand(ServeCommand)
- }
|