MCPcopy Index your code
hub / github.com/gopherjs/gopherjs / pkgVar

Method pkgVar

compiler/utils.go:376–386  ·  view source on GitHub ↗
(pkg *types.Package)

Source from the content-addressed store, hash-verified

374}
375
376func (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
388func isVarOrConst(o types.Object) bool {
389 switch o.(type) {

Callers 2

objectNameMethod · 0.95
varPtrNameMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected