1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-18 07:20:57 +00:00
Beego/vendor/github.com/go-redis/redis/internal/util/strconv.go

20 lines
476 B
Go
Raw Normal View History

2018-07-30 04:05:51 +00:00
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)
}