Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #6 from karimra/5-path-flag
Browse files Browse the repository at this point in the history
removed defatult "/" path and marked path mandatory
  • Loading branch information
karimra authored Apr 23, 2020
2 parents 9e80070 + c49d6b1 commit 0b6bb48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ var getCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(getCmd)

getCmd.Flags().StringSliceP("path", "", []string{"/"}, "get request paths")
getCmd.Flags().StringSliceP("path", "", []string{""}, "get request paths")
getCmd.MarkFlagRequired("path")
getCmd.Flags().StringP("prefix", "", "", "get request prefix")
getCmd.Flags().StringP("model", "", "", "get request model")
getCmd.Flags().StringP("type", "t", "ALL", "the type of data that is requested from the target. one of: ALL, CONFIG, STATE, OPERATIONAL")
Expand Down
3 changes: 2 additions & 1 deletion cmd/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ var subscribeCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(subscribeCmd)
subscribeCmd.Flags().StringP("prefix", "", "", "subscribe request prefix")
subscribeCmd.Flags().StringSliceP("path", "", []string{"/"}, "subscribe request paths")
subscribeCmd.Flags().StringSliceP("path", "", []string{""}, "subscribe request paths")
subscribeCmd.MarkFlagRequired("path")
subscribeCmd.Flags().Int32P("qos", "q", 20, "qos marking")
subscribeCmd.Flags().BoolP("updates-only", "", false, "only updates to current state should be sent")
subscribeCmd.Flags().StringP("subscription-mode", "", "stream", "one of: once, stream, poll")
Expand Down

0 comments on commit 0b6bb48

Please sign in to comment.