Description
The Wikipedia example constructs the exported wikipedia.SearchRequest type with an unkeyed struct literal:
wikipedia.SearchRequest{"bytedance"}
On current main (6752ff8da9b1ea85c8e91b27b0a64fef099f22f9), the repository's documented vet check reports:
components/tool/wikipedia/examples/main.go:49:32: wikipedia.SearchRequest struct literal uses unkeyed fields
Because the type belongs to another package, the unkeyed literal also couples the example to field order and will silently target the wrong field if fields are reordered.
Reproduction
From components/tool/wikipedia with Go 1.25.6 on Linux:
Expected behavior
The example should pass go vet and name the request field explicitly.
Suggested fix
Use wikipedia.SearchRequest{Query: "bytedance"}.
Description
The Wikipedia example constructs the exported
wikipedia.SearchRequesttype with an unkeyed struct literal:On current
main(6752ff8da9b1ea85c8e91b27b0a64fef099f22f9), the repository's documented vet check reports:Because the type belongs to another package, the unkeyed literal also couples the example to field order and will silently target the wrong field if fields are reordered.
Reproduction
From
components/tool/wikipediawith Go 1.25.6 on Linux:Expected behavior
The example should pass
go vetand name the request field explicitly.Suggested fix
Use
wikipedia.SearchRequest{Query: "bytedance"}.