mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-06 19:29:15 +08:00

* Add redis caching for thing and channel connections Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Fix authorization caching flow Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com> * Update things documentation Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
20 lines
476 B
Go
20 lines
476 B
Go
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)
|
|
}
|