Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #129 from nats-io/0012
Browse files Browse the repository at this point in the history
fix bug in parsing -1 bytes
  • Loading branch information
ripienaar authored Mar 24, 2020
2 parents 45a69d5 + 8c61b29 commit 3933a8e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
6 changes: 5 additions & 1 deletion nats/stream_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 == "" {
Expand Down

0 comments on commit 3933a8e

Please sign in to comment.