diff --git a/cmd/store/import.go b/cmd/store/import.go index f853753..f187e5a 100644 --- a/cmd/store/import.go +++ b/cmd/store/import.go @@ -245,8 +245,8 @@ var importCmd = &cobra.Command{ func init() { importCmd.Flags().String("file", "", "File Name. The file should have the store") importCmd.Flags().String("store-id", "", "Store ID") - importCmd.Flags().Int("max-tuples-per-write", tuple.MaxTuplesPerWrite, "Max tuples per write chunk.") - importCmd.Flags().Int("max-parallel-requests", tuple.MaxParallelRequests, "Max number of requests to issue to the server in parallel.") //nolint:lll + importCmd.Flags().Int32("max-tuples-per-write", tuple.MaxTuplesPerWrite, "Max tuples per write chunk.") + importCmd.Flags().Int32("max-parallel-requests", tuple.MaxParallelRequests, "Max number of requests to issue to the server in parallel.") //nolint:lll if err := importCmd.MarkFlagRequired("file"); err != nil { fmt.Printf("error setting flag as required - %v: %v\n", "cmd/models/write", err) diff --git a/cmd/tuple/delete.go b/cmd/tuple/delete.go index 52eb4d6..81b46b2 100644 --- a/cmd/tuple/delete.go +++ b/cmd/tuple/delete.go @@ -99,8 +99,8 @@ var deleteCmd = &cobra.Command{ func init() { deleteCmd.Flags().String("file", "", "Tuples file") deleteCmd.Flags().String("model-id", "", "Model ID") - deleteCmd.Flags().Int("max-tuples-per-write", MaxTuplesPerWrite, "Max tuples per write chunk.") - deleteCmd.Flags().Int("max-parallel-requests", MaxParallelRequests, "Max number of requests to issue to the server in parallel.") //nolint:lll + deleteCmd.Flags().Int32("max-tuples-per-write", MaxTuplesPerWrite, "Max tuples per write chunk.") + deleteCmd.Flags().Int32("max-parallel-requests", MaxParallelRequests, "Max number of requests to issue to the server in parallel.") //nolint:lll } func ExactArgsOrFlag(n int, flag string) cobra.PositionalArgs { diff --git a/cmd/tuple/import.go b/cmd/tuple/import.go index eb289c4..443cd41 100644 --- a/cmd/tuple/import.go +++ b/cmd/tuple/import.go @@ -32,10 +32,10 @@ import ( ) // MaxTuplesPerWrite Limit the tuples in a single batch. -var MaxTuplesPerWrite = 1 +var MaxTuplesPerWrite = int32(1) // MaxParallelRequests Limit the parallel writes to the API. -var MaxParallelRequests = 10 +var MaxParallelRequests = int32(10) type failedWriteResponse struct { TupleKey client.ClientTupleKey `json:"tuple_key"` @@ -206,6 +206,6 @@ var importCmd = &cobra.Command{ func init() { importCmd.Flags().String("model-id", "", "Model ID") importCmd.Flags().String("file", "", "Tuples file") - importCmd.Flags().Int("max-tuples-per-write", MaxTuplesPerWrite, "Max tuples per write chunk.") - importCmd.Flags().Int("max-parallel-requests", MaxParallelRequests, "Max number of requests to issue to the server in parallel.") //nolint:lll + importCmd.Flags().Int32("max-tuples-per-write", MaxTuplesPerWrite, "Max tuples per write chunk.") + importCmd.Flags().Int32("max-parallel-requests", MaxParallelRequests, "Max number of requests to issue to the server in parallel.") //nolint:lll } diff --git a/cmd/tuple/write.go b/cmd/tuple/write.go index 76e7133..b345f50 100644 --- a/cmd/tuple/write.go +++ b/cmd/tuple/write.go @@ -150,6 +150,6 @@ func init() { writeCmd.Flags().String("file", "", "Tuples file") writeCmd.Flags().String("condition-name", "", "Condition Name") writeCmd.Flags().String("condition-context", "", "Condition Context (as a JSON string)") - writeCmd.Flags().Int("max-tuples-per-write", MaxTuplesPerWrite, "Max tuples per write chunk.") - writeCmd.Flags().Int("max-parallel-requests", MaxParallelRequests, "Max number of requests to issue to the server in parallel.") + writeCmd.Flags().Int32("max-tuples-per-write", MaxTuplesPerWrite, "Max tuples per write chunk.") + writeCmd.Flags().Int32("max-parallel-requests", MaxParallelRequests, "Max number of requests to issue to the server in parallel.") //nolint:lll }