Skip to content

Commit

Permalink
add leaked bind
Browse files Browse the repository at this point in the history
  • Loading branch information
giskook committed Jun 20, 2023
1 parent c67f1f7 commit abe180b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/okbchaind/iaviewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ func iaviewerReadNodeCmd(ctx *iaviewerContext) *cobra.Command {
},
}
cmd.PersistentFlags().String(flagNodeHash, "", "print only the value for this hash, key must be in hex format.")
viper.BindPFlag(flagNodeHash, cmd.PersistentFlags().Lookup(flagNodeHash))
return cmd
}

Expand Down Expand Up @@ -321,6 +322,8 @@ func iaviewerDiffCmd(ctx *iaviewerContext) *cobra.Command {
}
cmd.PersistentFlags().Bool(flagHex, false, "print key and value in hex format")
cmd.PersistentFlags().String(flagKeyPrefix, "", "diff values for keys with specified prefix, prefix must be in hex format.")
viper.BindPFlag(flagHex, cmd.PersistentFlags().Lookup(flagHex))
viper.BindPFlag(flagKeyPrefix, cmd.PersistentFlags().Lookup(flagKeyPrefix))
return cmd
}

Expand Down

0 comments on commit abe180b

Please sign in to comment.