update golang
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
andrey1s
2022-03-13 11:56:49 +03:00
parent f70653066a
commit 51b844d50b
15 changed files with 165 additions and 138 deletions

View File

@@ -265,31 +265,45 @@ func (v Value) asFloat64() float64 {
}
func (v Value) asComplex64() complex64 {
return v.value.(complex64)
cmplex, _ := v.value.(complex64)
return cmplex
}
func (v Value) asComplex128() complex128 {
return v.value.(complex128)
cmplex, _ := v.value.(complex128)
return cmplex
}
func (v Value) asUintptr() uintptr {
return v.value.(uintptr)
val, _ := v.value.(uintptr)
return val
}
func (v Value) asBinary() []byte {
return v.value.([]byte)
bytes, _ := v.value.([]byte)
return bytes
}
func (v Value) asDuration() time.Duration {
return v.value.(time.Duration)
duration, _ := v.value.(time.Duration)
return duration
}
func (v Value) asTime() time.Time {
return v.value.(time.Time)
value, _ := v.value.(time.Time)
return value
}
func (v Value) asError() error {
return v.value.(error)
err, _ := v.value.(error)
return err
}
func nilValue(t Type) Value {