mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 03:58:06 +00:00
17 lines
399 B
Go
17 lines
399 B
Go
// Package convert provides functions for type conversion.
|
|
package convert
|
|
|
|
// ToInteger converts it's argument to an Integer.
|
|
func ToInteger(v interface{}) int {
|
|
return v.(int)
|
|
}
|
|
|
|
// ToByteArray converts it's argument to a ByteArray.
|
|
func ToByteArray(v interface{}) []byte {
|
|
return v.([]byte)
|
|
}
|
|
|
|
// ToBool converts it's argument to a Boolean.
|
|
func ToBool(v interface{}) bool {
|
|
return v.(bool)
|
|
}
|