Skip to content

Rename example tests to pass go vet naming convention#116

Open
StevenACoffman wants to merge 1 commit intor3labs:masterfrom
StevenACoffman:master
Open

Rename example tests to pass go vet naming convention#116
StevenACoffman wants to merge 1 commit intor3labs:masterfrom
StevenACoffman:master

Conversation

@StevenACoffman
Copy link

@StevenACoffman StevenACoffman commented Aug 14, 2025

Previously go vet would complain with:

# github.com/r3labs/diff/v3
./diff.go:100:2: struct field parent has json tag but is not exported
# github.com/r3labs/diff/v3_test
# [github.com/r3labs/diff/v3_test]
./diff_examples_test.go:13:1: ExamplePatchWithErrors refers to unknown identifier: PatchWithErrors
./diff_examples_test.go:173:1: ExamplePrimitiveSlice refers to unknown identifier: PrimitiveSlice
./diff_examples_test.go:257:1: ExampleComplexSlicePatch refers to unknown identifier: ComplexSlicePatch
./diff_examples_test.go:319:1: ExampleComplexMapPatch refers to unknown identifier: ComplexMapPatch
./diff_examples_test.go:596:1: ExamplePrivatePtr refers to unknown identifier: PrivatePtr

I did not correct line 100 in diff.go, since that might break backward compatibility, but this will help with the go test failure:
https://github.com/r3labs/diff/actions/runs/16860105094/job/47759060545

Signed-off-by: Steve Coffman <steve@khanacademy.org>
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.

1 participant