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

encoder: Update go-codec version. #560

Merged
merged 4 commits into from
Jun 15, 2023
Merged

Conversation

winder
Copy link
Contributor

@winder winder commented Jun 14, 2023

With the new version of go-codec, integer keys are quoted.

@winder winder self-assigned this Jun 14, 2023
@winder winder changed the title Update go-codec version. encoder: Update go-codec version. Jun 15, 2023
assert.NotContains(t, data, "0:")
}

func TestStrictEncodeMapInterfaceKeyAsString(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test was re-enabled. The one below is new. The rest were reformatted to be standalone tests instead of using t.Run

@winder winder requested a review from algochoi June 15, 2023 12:00
Copy link
Contributor

@algochoi algochoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! 🎉

Minor nits suggested below, but LGTM and tests look much cleaner now


data := TestStruct{
Complex: map[KeyStruct]string{
KeyStruct{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linter says to remove KeyStruct:

Suggested change
KeyStruct{
{

}

encoded := Encode(data)
fmt.Println(string(encoded))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leftover debug message?

@winder winder requested a review from a team as a code owner June 15, 2023 18:13
@winder winder requested review from excalq and algobarb June 15, 2023 18:13
@winder winder merged commit dc03767 into develop Jun 15, 2023
@winder winder deleted the will/update-codec-dependency branch June 15, 2023 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants