diff --git a/internal/lsp/helper/helper.go b/internal/lsp/helper/helper.go index a1cc1dc573..e90f2f4076 100644 --- a/internal/lsp/helper/helper.go +++ b/internal/lsp/helper/helper.go @@ -128,7 +128,7 @@ func doUses() { continue } nm := fd.Name.String() - if isExported(nm) { + if ast.IsExported(nm) { // we're looking for things like didChange continue } @@ -224,7 +224,7 @@ func whatis(x ast.Expr) string { case *ast.StarExpr: return "*" + whatis(n.X) case *ast.Ident: - if isExported(n.Name) { + if ast.IsExported(n.Name) { // these are from package protocol return "protocol." + n.Name } @@ -238,7 +238,3 @@ func whatis(x ast.Expr) string { return fmt.Sprintf("%T", x) } } - -func isExported(n string) bool { - return n[0] >= 'A' && n[0] <= 'Z' -}