diff --git a/event.go b/event.go index 6b10896..b824205 100644 --- a/event.go +++ b/event.go @@ -89,7 +89,7 @@ example: Name: "nevent", Usage: "print the nevent code (to stderr) after the event is published", }, - &cli.IntFlag{ + &cli.UintFlag{ Name: "kind", Aliases: []string{"k"}, Usage: "event kind", @@ -177,7 +177,7 @@ example: kindWasSupplied = strings.Contains(stdinEvent, `"kind"`) } - if kind := c.Int("kind"); slices.Contains(c.FlagNames(), "kind") { + if kind := c.Uint("kind"); slices.Contains(c.FlagNames(), "kind") { evt.Kind = int(kind) mustRehashAndResign = true } else if !kindWasSupplied { diff --git a/req.go b/req.go index 1f542ad..2e8e7cf 100644 --- a/req.go +++ b/req.go @@ -80,7 +80,7 @@ example: Usage: "only accept events older than this (unix timestamp)", Category: CATEGORY_FILTER_ATTRIBUTES, }, - &cli.IntFlag{ + &cli.UintFlag{ Name: "limit", Aliases: []string{"l"}, Usage: "only accept up to this number of events", @@ -251,7 +251,7 @@ example: return fmt.Errorf("parse error: Invalid numeric literal %q", until) } } - if limit := c.Int("limit"); limit != 0 { + if limit := c.Uint("limit"); limit != 0 { filter.Limit = int(limit) } else if c.IsSet("limit") || c.Bool("stream") { filter.LimitZero = true