diff --git a/go.mod b/go.mod index 79a0fff..07dfe79 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/gosuri/uiprogress v0.0.1 github.com/guptarohit/asciigraph v0.4.1 github.com/nats-io/jsm.go v0.0.0-20200304134846-c02f52026763 - github.com/nats-io/nats-server/v2 v2.1.5-0.20200319010826-68c29ee08d45 + github.com/nats-io/nats-server/v2 v2.1.5-0.20200323195732-853fb345309a github.com/nats-io/nats.go v1.9.1 github.com/xlab/tablewriter v0.0.0-20160610135559-80b567a11ad5 golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 diff --git a/go.sum b/go.sum index 74a05b9..26673bd 100644 --- a/go.sum +++ b/go.sum @@ -44,8 +44,8 @@ github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= github.com/nats-io/nats-server/v2 v2.1.5-0.20200228231124-42fe104358e2 h1:XLXs9bZBB1MRBr9uCxdloSodBG5rVycJwLqhh7wFj6E= github.com/nats-io/nats-server/v2 v2.1.5-0.20200228231124-42fe104358e2/go.mod h1:FBtPk+0dj8JdsLJ1eiXh7OLXnJiwjO6VpJkzjYo7lro= -github.com/nats-io/nats-server/v2 v2.1.5-0.20200319010826-68c29ee08d45 h1:und7HKyewIEKSm6jvNABXQN6fm6bqMbdEXM5EjJsmDk= -github.com/nats-io/nats-server/v2 v2.1.5-0.20200319010826-68c29ee08d45/go.mod h1:FBtPk+0dj8JdsLJ1eiXh7OLXnJiwjO6VpJkzjYo7lro= +github.com/nats-io/nats-server/v2 v2.1.5-0.20200323195732-853fb345309a h1:qsgMJKdrweupF3exXqWZshm6af+4kDzdF/81Ei9IyD4= +github.com/nats-io/nats-server/v2 v2.1.5-0.20200323195732-853fb345309a/go.mod h1:FBtPk+0dj8JdsLJ1eiXh7OLXnJiwjO6VpJkzjYo7lro= github.com/nats-io/nats.go v1.9.1 h1:ik3HbLhZ0YABLto7iX80pZLPw/6dx3T+++MZJwLnMrQ= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0 h1:qMd4+pRHgdr1nAClu+2h/2a5F2TmKcCzjCDazVgRoX4= diff --git a/nats/stream_command.go b/nats/stream_command.go index 6a7f10f..d8b5c4e 100644 --- a/nats/stream_command.go +++ b/nats/stream_command.go @@ -636,8 +636,12 @@ func (c *streamCmd) prepareConfig() (cfg api.StreamConfig) { } if c.maxBytesLimit == 0 { - c.maxBytesLimit, err = askOneBytes("Message size limit", "-1", "Defines the combined size of all messages in a Stream, when exceeded oldest messages are removed, -1 for unlimited. Settable using --max-bytes") + c.maxBytesLimit, err = askOneBytes("Message size limit", "0", "Defines the combined size of all messages in a Stream, when exceeded oldest messages are removed, -1 for unlimited. Settable using --max-bytes") kingpin.FatalIfError(err, "invalid input") + + if c.maxBytesLimit == 0 { + c.maxBytesLimit = -1 + } } if c.maxAgeLimit == "" {