Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: panic in spew when dealing with unexported fields#1828

Open
ccoVeille wants to merge 1 commit intostretchr:masterfrom
ccoveille-forks:gospew-panic
Open

fix: panic in spew when dealing with unexported fields#1828
ccoVeille wants to merge 1 commit intostretchr:masterfrom
ccoveille-forks:gospew-panic

Conversation

@ccoVeille
Copy link
Collaborator

@ccoVeille ccoVeille commented Nov 18, 2025

Summary

Fix panic that happens when spew tries to sort unexported fields

Changes

Fix the panic raised by Interface() on unexported fields

CanInterface() is the solution

Motivation

Now, go-spew is vendored, we can fix old issues we had

Related issues

@ccoVeille ccoVeille marked this pull request as ready for review November 28, 2025 11:39
@HaraldNordgren
Copy link
Contributor

@ccoVeille Looks good! ✅

fredbi added a commit to fredbi/testify that referenced this pull request Jan 2, 2026
This PR adapts stretchr#1828

It fixes an edge case the spew lib when diffing a map with keys of type
array.

Signed-off-by: Frederic BIDON <[email protected]>
fredbi added a commit to go-openapi/testify that referenced this pull request Jan 2, 2026
This PR adapts stretchr#1828

It fixes an edge case the spew lib when diffing a map with keys of type
array.

Signed-off-by: Frederic BIDON <[email protected]>
@HaraldNordgren
Copy link
Contributor

HaraldNordgren commented Jan 29, 2026

Let's merge this? Then we can also close #1816.

@dolmen dolmen added bug pkg-assert Change related to package testify/assert pkg-require Change related to package testify/require labels Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug pkg-assert Change related to package testify/assert pkg-require Change related to package testify/require

Projects

None yet

Development

Successfully merging this pull request may close these issues.

assert.Equal panic on diff unexported map with array as key Panic in assert/require.Equal when calling into go-spew

3 participants