near / borsh-go

Go implementation of Binary Object Representation Serializer for Hashing
The Unlicense
50 stars 16 forks source link

how to Deserialize option field #9

Closed binnz closed 2 years ago

binnz commented 2 years ago
pub struct Order {
    account_type: Header,
    mint: Pubkey,
    user: Pubkey,
    token_mint: Option<Pubkey>,
    price: u64,
}

type Pubkey [32]byte

like this rust struct, how to Deserialize use borsh in golang?

frol commented 2 years ago

@ouromoros Can you help here, please?

ouromoros commented 2 years ago

Option<Pubkey> would correspond to *Pubkey type in Go here. The doc should have made it clear.