MCPcopy
hub / github.com/tinygo-org/tinygo / OriginalDir

Method OriginalDir

loader/loader.go:341–343  ·  view source on GitHub ↗

OriginalDir returns the real directory name. It is the same as p.Dir except that if it is part of the cached GOROOT, its real location is returned.

()

Source from the content-addressed store, hash-verified

339// OriginalDir returns the real directory name. It is the same as p.Dir except
340// that if it is part of the cached GOROOT, its real location is returned.
341func (p *Package) OriginalDir() string {
342 return strings.TrimSuffix(p.program.getOriginalPath(p.Dir+string(os.PathSeparator)), string(os.PathSeparator))
343}
344
345// parseFile is a wrapper around parser.ParseFile.
346func (p *Package) parseFile(path string, mode parser.Mode) (*ast.File, error) {

Callers 2

CompilePackageFunction · 0.80
BuildFunction · 0.80

Calls 1

getOriginalPathMethod · 0.80

Tested by

no test coverage detected