首先,cgo非常酷,感谢你:) 我确实有一个问题,我有很多只包含字节数组的C结构,我想将其中的数组用作[]byte。/schnorr.go:39:43: cannot use key.pubkey.data[:] (type []_Ctype_uchar) as type []byte in argument tohex.EncodeToString(C.GoBytes(unsafe.Pointer(&key.pubkey.data[0]), C.int(len(key.pubkey.data)))) 但
我想要删除切片中的一项,而不需要对切片中的每一种类型的项使用特定的函数。{ fmt.Println(sliceRemoveItem(array,1))
} 但goLang/prog.go:13:30: cannot use array (type []int) as type []interface {} in argument t