MCPcopy Index your code
hub / github.com/coder/coder / declaredIdentForm

Function declaredIdentForm

scripts/intxcheck/analyzer.go:512–524  ·  view source on GitHub ↗
(pass *analysis.Pass, expr ast.Expr)

Source from the content-addressed store, hash-verified

510}
511
512func declaredIdentForm(pass *analysis.Pass, expr ast.Expr) (exprForm, bool) {
513 ident, ok := unparen(expr).(*ast.Ident)
514 if !ok || ident.Name == "_" {
515 return exprForm{}, false
516 }
517
518 obj := pass.TypesInfo.Defs[ident]
519 if obj == nil {
520 return exprForm{}, false
521 }
522
523 return exprForm{text: ident.Name, root: obj}, true
524}
525
526func identObject(pass *analysis.Pass, ident *ast.Ident) types.Object {
527 if ident == nil {

Callers 1

collectAliasMethod · 0.85

Calls 1

unparenFunction · 0.85

Tested by

no test coverage detected