go-zookeeper
go-zookeeper copied to clipboard
Fix: Exists() should always return false when an error happenning and FLW parsing enhancement
This PR solved 2 small issues togethor:
- Newer zookeeper (tested with 3.6.x) outputs a little different in 4-letter-word response.
- Exists() acts different to ExistsW()
Description
FLW
Newer server will response different on latency element:
Latency min/avg/max: 0/0.9167/8
Which seems like some float numbers.
So I adjust the regex expression to pass it.
Exists()
Exists() will return true with an error except ErrNoNode
:
error happened | result | error returned |
---|---|---|
nil | true | nil |
ErrNoNode | false | nil |
Any other | ~true~(incorrect ) |
error |
In addition ExistsW()
acts correctly.