Explorar o código

Format the default value of a duration flag in a better way (Go is not very typesafe)

Ben Hood %!s(int64=11) %!d(string=hai) anos
pai
achega
aa1530a4e4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      cassandra_test.go

+ 1 - 1
cassandra_test.go

@@ -29,7 +29,7 @@ var (
 	flagRF       = flag.Int("rf", 1, "replication factor for test keyspace")
 	clusterSize  = flag.Int("clusterSize", 1, "the expected size of the cluster")
 	flagRetry    = flag.Int("retries", 5, "number of times to retry queries")
-	flagAutoWait = flag.Duration("autowait", 1000, "milliseconds to wait for autodiscovery to fill the hosts poll")
+	flagAutoWait = flag.Duration("autowait", 1000*time.Millisecond, "time to wait for autodiscovery to fill the hosts poll")
 	clusterHosts []string
 )