(pkg *types.Package)
| 374 | } |
| 375 | |
| 376 | func (fc *funcContext) pkgVar(pkg *types.Package) string { |
| 377 | if pkg == fc.pkgCtx.Pkg { |
| 378 | return "$pkg" |
| 379 | } |
| 380 | |
| 381 | pkgVar, found := fc.pkgCtx.pkgVars[pkg.Path()] |
| 382 | if !found { |
| 383 | pkgVar = fmt.Sprintf(`$packages["%s"]`, pkg.Path()) |
| 384 | } |
| 385 | return pkgVar |
| 386 | } |
| 387 | |
| 388 | func isVarOrConst(o types.Object) bool { |
| 389 | switch o.(type) { |
no outgoing calls
no test coverage detected