Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

fix: use pointer for struct field so the default value from unmarshal is nil #36

Merged

Conversation

jiangpengcheng
Copy link
Member

Fixes #TODO

Motivation

  1. non-pointer struct field will create an empty struct when doing unmarshal for an empty value, which is not expected

Modifications

  1. use pointer for ProducerConfig, CryptoConfig and BatchSourceConfig
  2. add RetainKeyOrdering to the sinkData

Verification

@jiangpengcheng jiangpengcheng requested a review from a team as a code owner July 18, 2023 01:58
@jiangpengcheng jiangpengcheng changed the title feat: use pointer for struct field so the default value from unmarshal is nil fix: use pointer for struct field so the default value from unmarshal is nil Jul 18, 2023
@nlu90 nlu90 merged commit e69fbab into streamnative:master Jul 19, 2023
tisonkun pushed a commit to tisonkun/pulsar-client-go that referenced this pull request Aug 15, 2023
tisonkun pushed a commit to tisonkun/pulsar-client-go that referenced this pull request Aug 15, 2023
… is nil (streamnative/pulsar-admin-go#36)

Use pointer for struct field so the default value from unmarshal is nil

Co-authored-by: Neng Lu <[email protected]>
tisonkun pushed a commit to tisonkun/pulsar-client-go that referenced this pull request Aug 15, 2023
… is nil (streamnative/pulsar-admin-go#36)

Use pointer for struct field so the default value from unmarshal is nil

Co-authored-by: Neng Lu <[email protected]>
tisonkun pushed a commit to apache/pulsar-client-go that referenced this pull request Aug 16, 2023
… is nil (streamnative/pulsar-admin-go#36)

Use pointer for struct field so the default value from unmarshal is nil

Co-authored-by: Neng Lu <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants