Split (importer).ImportFrom into its own build-tag-guarded file.
This keeps the lint package building with Go 1.5.
diff --git a/lint.go b/lint.go
index 52750b9..e84f46d 100644
--- a/lint.go
+++ b/lint.go
@@ -248,9 +248,7 @@
return i.impFn(i.packages, path, "")
}
-func (i importer) ImportFrom(path, srcDir string, mode types.ImportMode) (*types.Package, error) {
- return i.impFn(i.packages, path, srcDir)
-}
+// (importer).ImportFrom is in lint16.go.
func (p *pkg) typeCheck() error {
config := &types.Config{
diff --git a/lint16.go b/lint16.go
new file mode 100644
index 0000000..34205aa
--- /dev/null
+++ b/lint16.go
@@ -0,0 +1,17 @@
+// Copyright (c) 2016 The Go Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd.
+
+// +build go1.6
+
+package lint
+
+import "go/types"
+
+// This is in its own file so it can be ignored under Go 1.5.
+
+func (i importer) ImportFrom(path, srcDir string, mode types.ImportMode) (*types.Package, error) {
+ return i.impFn(i.packages, path, srcDir)
+}