google / wire

Compile-time Dependency Injection for Go
Apache License 2.0
13.13k stars 623 forks source link

wire `sync.Map` throw error #376

Closed richenlin closed 1 year ago

richenlin commented 2 years ago

You can use go bug to have a cool, automatically filled out bug template, or fill out the template below.

Describe the bug

exec: "wire ./..." , not support sync.Map , throw error:

cannot use (func(key, value interface{}) bool literal) (value of type func(key interface{}, value interface{}) bool) as func(key invalid type, value invalid type) bool value in argument to v.Range

Version

go version: 1.19.2 , wire: v0.5.0

liyuliang commented 2 years ago

I have meet the same wrong, does it fix?

richenlin commented 1 year ago

fix it: