x/tools/gopls: offer completions with automatic casts #42764
Labels
FeatureRequest
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
help wanted
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
It would be nice if completing at
<>
offeredfloat64(myInt)
as a completion. This comes up often for me when passing an int to something that wants an int64, float64, etc. Another common case where it would be useful:It would be useful if
<>
offeredtime.Duration(i)
to help you towardstime.Duration(i) * time.Millisecond
, or whatever.Similarly, but maybe less common:
It might be nice if completing at
<>
offeredmyIntf.(float64)
as a completion. Unchecked type assertions are relatively rare, though, so perhaps not worth the effort.The text was updated successfully, but these errors were encountered: