Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add xml marshal for Int type #365

Merged
merged 1 commit into from
Nov 29, 2023
Merged

feat: add xml marshal for Int type #365

merged 1 commit into from
Nov 29, 2023

Conversation

ruojunm
Copy link
Contributor

@ruojunm ruojunm commented Nov 28, 2023

Description

feat: add xml marshal for Int type

Rationale

When client uses golang/encoding/xml marshaler, it can't marshal cosmos Int type. So this PR will solve this problem.

Example


func (s *intTestSuite) TestIntXmlMarshalRoundTrip() {
	u1 := math.NewInt(256)
	marshalResult, _ := xml.Marshal(u1)
	u2 := math.Int{}
	xml.Unmarshal(marshalResult, &u2)
	s.Require().Equal(u1, u2)
}

Changes

Notable changes:

  • add xml marshal and unmarshal methods for Int type
  • add ut

@ruojunm ruojunm added this pull request to the merge queue Nov 29, 2023
Merged via the queue into develop with commit 1e407f2 Nov 29, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants