We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
At the moment, it seems nil/uninitialized slices are == initialized empty list slices.
type testStruct struct { A []string } func Test_DiffNilList(t *testing.T) { p := testStruct{} assert.Nil(t, p.A) n := testStruct{ A: []string{}, } assert.NotNil(t, n.A) res, err := diff.Diff(p, n) if !assert.NoError(t, err) { return } assert.Equal(t, 1, len(res)) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
At the moment, it seems nil/uninitialized slices are == initialized empty list slices.
The text was updated successfully, but these errors were encountered: