func a() ([]byte, error){
// 反射 要执行的函数为 b()
result = funcValue.Call(params)
return result[0].Bytes(),new err(result[1].String()) // 这样嚒?
}
func b(parmam...) ([]byte, error) { //... return []byte, err }
func a() ([]byte, error){
// 反射 要执行的函数为 b()
result = funcValue.Call(params)
return result[0].Bytes(),new err(result[1].String()) // 这样嚒?
}
func b(parmam...) ([]byte, error) { //... return []byte, err }
1
icexin Nov 21, 2018 result[1].Interface().(error)
|
2
soulsxd Nov 21, 2018 retVal[1].Interface().(error)
|