ToProto converts BitArray to protobuf
()
| 420 | |
| 421 | // ToProto converts BitArray to protobuf |
| 422 | func (bA *BitArray) ToProto() *tmprotobits.BitArray { |
| 423 | if bA == nil || len(bA.Elems) == 0 { |
| 424 | return nil |
| 425 | } |
| 426 | |
| 427 | return &tmprotobits.BitArray{ |
| 428 | Bits: int64(bA.Bits), |
| 429 | Elems: bA.Elems, |
| 430 | } |
| 431 | } |
| 432 | |
| 433 | // FromProto sets a protobuf BitArray to the given pointer. |
| 434 | func (bA *BitArray) FromProto(protoBitArray *tmprotobits.BitArray) { |
no outgoing calls