Fix passing -i/--index to sub command

This commit is contained in:
James Mills 2022-04-02 23:22:12 +10:00
parent f062b539bc
commit 50e028c39c
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6

View File

@ -58,6 +58,9 @@ func init() {
"index", "i", -1,
"position in the topic's sequence to start subscribing from (-1 indicates end)",
)
viper.BindPFlag("index", subCmd.Flags().Lookup("index"))
viper.SetDefault("index", -1)
}
func handler(command string, args []string) msgbus.HandlerFunc {