cmd/timelines.go
changeset 44 6da40ca4534c
parent 22 5778b09bc6fe
child 47 82d8b6074309
--- a/cmd/timelines.go	Sun Apr 30 20:02:11 2017 +0200
+++ b/cmd/timelines.go	Sun Apr 30 20:45:40 2017 +0200
@@ -12,8 +12,9 @@
 )
 
 var timelineOpts struct {
-	local                 bool
-	limit, sinceID, maxID uint
+	local          bool
+	limit          uint
+	sinceID, maxID int64
 }
 
 // timelineCmd represents the timelines command
@@ -37,8 +38,8 @@
 
 	timelineCmd.Flags().BoolVar(&timelineOpts.local, "local", false, "Posts from the local instance")
 	timelineCmd.Flags().UintVarP(&timelineOpts.limit, "limit", "l", 0, "Limit number of results")
-	timelineCmd.PersistentFlags().UintVar(&timelineOpts.sinceID, "since-id", 0, "Request IDs greater than a value")
-	timelineCmd.PersistentFlags().UintVar(&timelineOpts.maxID, "max-id", 0, "Request IDs less (or equal) than a value")
+	timelineCmd.PersistentFlags().Int64Var(&timelineOpts.sinceID, "since-id", 0, "Request IDs greater than a value")
+	timelineCmd.PersistentFlags().Int64Var(&timelineOpts.maxID, "max-id", 0, "Request IDs less (or equal) than a value")
 }
 
 func timelineRunE(cmd *cobra.Command, args []string) error {
@@ -53,10 +54,10 @@
 		limOpts.Limit = int(opt.limit)
 	}
 	if opt.maxID > 0 {
-		limOpts.MaxID = int(opt.maxID)
+		limOpts.MaxID = opt.maxID
 	}
 	if opt.sinceID > 0 {
-		limOpts.SinceID = int(opt.sinceID)
+		limOpts.SinceID = opt.sinceID
 	}
 
 	tl := "home"