Description

Int is a helper that converts a command reply to an integer. If err is not equal to nil, then Int returns 0, err. Otherwise, Int converts the reply to an int as follows:

Reply type    Result
integer       int(reply), nil
bulk string   parsed reply, nil
nil           0, ErrNil
other         0, error

Int is referenced in 234 repositories

github.com/garyburd/redigo github.com/alicebob/miniredis github.com/eddyzhou/miniredis

...