We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcb2d7b commit 1523bb4Copy full SHA for 1523bb4
internal/lsp/source/hover.go
@@ -241,7 +241,7 @@ func objectString(obj types.Object, qf types.Qualifier) string {
241
break
242
}
243
pkg := typ.Obj().Pkg()
244
- if pkg.Path() == "time" && pkg.Scope().Lookup("Duration") != nil {
+ if pkg.Path() == "time" && typ.Obj().Name() == "Duration" {
245
if d, ok := constant.Int64Val(obj.Val()); ok {
246
str += " // " + time.Duration(d).String()
247
0 commit comments