diff options
Diffstat (limited to 'vendor/github.com/go-redis/redis/internal/util/strconv.go')
-rw-r--r-- | vendor/github.com/go-redis/redis/internal/util/strconv.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/github.com/go-redis/redis/internal/util/strconv.go b/vendor/github.com/go-redis/redis/internal/util/strconv.go new file mode 100644 index 0000000000..db5033802a --- /dev/null +++ b/vendor/github.com/go-redis/redis/internal/util/strconv.go @@ -0,0 +1,19 @@ +package util + +import "strconv" + +func Atoi(b []byte) (int, error) { + return strconv.Atoi(BytesToString(b)) +} + +func ParseInt(b []byte, base int, bitSize int) (int64, error) { + return strconv.ParseInt(BytesToString(b), base, bitSize) +} + +func ParseUint(b []byte, base int, bitSize int) (uint64, error) { + return strconv.ParseUint(BytesToString(b), base, bitSize) +} + +func ParseFloat(b []byte, bitSize int) (float64, error) { + return strconv.ParseFloat(BytesToString(b), bitSize) +} |