예제 #1
0
파일: key.go 프로젝트: noxiouz/elliptics-go
func (k *Key) SetRawId(id []byte) error {
	if len(id) > DNET_ID_SIZE {
		return ErrInvalidDnetID
	}

	C.key_set_raw_id(k.key, unsafe.Pointer(&id[0]), C.int(len(id)))
	return nil
}
예제 #2
0
func (k *Key) SetRawId(id []byte) {
	C.key_set_raw_id(k.key, unsafe.Pointer(&id[0]), C.int(len(id)))
	return
}