Skip to content

Commit

Permalink
Updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
archsh committed Mar 10, 2021
1 parent 38e169c commit 66c5be4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion cli/demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cli

import (
"fmt"
"github.com/extvos/kepler/service"

"github.com/spf13/cobra"
)
Expand All @@ -12,6 +13,8 @@ var demoCmd = &cobra.Command{
Short: "Run a demo application powered by kepler.",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("To be done...")
listenAddr, _ := cmd.Flags().GetString("listen")
service.Start(listenAddr)
},
}

Expand All @@ -20,6 +23,7 @@ func DemoCmd() *cobra.Command {
}

func init() {
demoCmd.Flags().StringP("listen","L","127.0.0.1:8080","Demo application listen address and port.")
demoCmd.Flags().StringP("listen", "L", "127.0.0.1:8080", "Demo application listen address and port.")
demoCmd.Flags().StringP("config", "C", "", "Configuration filename.")
//rootCmd.AddCommand(newCmd)
}
3 changes: 1 addition & 2 deletions kepler.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ func init() {
rootCmd.Flags().BoolP("verbose", "V", false, "Toggle debug messages")
}


func init() {
//rootCmd.AddCommand(cmd.InitCmd(), cmd.VersionCmd(), cmd.ServeCmd())
rootCmd.AddCommand(cli.NewCmd())
rootCmd.AddCommand(cli.NewCmd(), cli.DemoCmd())
}

func main() {
Expand Down

0 comments on commit 66c5be4

Please sign in to comment.