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

Function rootIdentAndSuffix

scripts/intxcheck/analyzer.go:536–549  ·  view source on GitHub ↗
(expr ast.Expr)

Source from the content-addressed store, hash-verified

534}
535
536func rootIdentAndSuffix(expr ast.Expr) (*ast.Ident, string, bool) {
537 switch expr := unparen(expr).(type) {
538 case *ast.Ident:
539 return expr, "", true
540 case *ast.SelectorExpr:
541 ident, suffix, ok := rootIdentAndSuffix(expr.X)
542 if !ok {
543 return nil, "", false
544 }
545 return ident, suffix + "." + expr.Sel.Name, true
546 default:
547 return nil, "", false
548 }
549}
550
551func callReceiver(call *ast.CallExpr) ast.Expr {
552 selector, ok := unparen(call.Fun).(*ast.SelectorExpr)

Callers 1

exprFormForFunction · 0.85

Calls 1

unparenFunction · 0.85

Tested by

no test coverage detected