Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
s/ImportPath/BuildImportPath/
  • Loading branch information
flimzy committed Oct 20, 2015
commit 8c83af6e8967589e6914247c592c7b48abc2dd11
6 changes: 3 additions & 3 deletions build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func NewSession(options *Options) *Session {
options: options,
Packages: make(map[string]*PackageData),
}
s.ImportContext = compiler.NewImportContext(s.ImportPackage)
s.ImportContext = compiler.NewImportContext(s.BuildImportPath)
if options.Watch {
if out, err := exec.Command("ulimit", "-n").Output(); err == nil {
if n, err := strconv.Atoi(strings.TrimSpace(string(out))); err == nil && n < 1024 {
Expand Down Expand Up @@ -371,7 +371,7 @@ func (s *Session) BuildFiles(filenames []string, pkgObj string, packagePath stri
return s.WriteCommandPackage(pkg, pkgObj)
}

func (s *Session) ImportPackage(path string) (*compiler.Archive, error) {
func (s *Session) BuildImportPath(path string) (*compiler.Archive, error) {
if pkg, found := s.Packages[path]; found {
return pkg.Archive, nil
}
Expand Down Expand Up @@ -427,7 +427,7 @@ func (s *Session) BuildPackage(pkg *PackageData) error {
if importedPkgPath == "unsafe" || ignored {
continue
}
_, err := s.ImportPackage(importedPkgPath)
_, err := s.BuildImportPath(importedPkgPath)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion tool.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func main() {
}
for _, pkgPath := range pkgs {
pkgPath = filepath.ToSlash(pkgPath)
if _, err := s.ImportPackage(pkgPath); err != nil {
if _, err := s.BuildImportPath(pkgPath); err != nil {
return err
}
pkg := s.Packages[pkgPath]
Expand Down