Skip to content

Commit 658e86e

Browse files
committed
Hack vendored golang.org packages in the stdlib
Fixes davecheney#11 Fixes the bug with a hack worthy of the `vendor/` feature itself.
1 parent 47c524b commit 658e86e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ import (
1616
"log"
1717
"os"
1818
"os/exec"
19+
"path"
1920
"regexp"
21+
"strings"
2022

2123
"github.com/pkg/browser"
2224
)
@@ -41,6 +43,10 @@ func findImport(p string) {
4143
// seen this package before, skip it
4244
return
4345
}
46+
if strings.HasPrefix(p, "golang_org") {
47+
p = path.Join("vendor", p)
48+
}
49+
4450
pkg, err := build.Import(p, "", 0)
4551
if err != nil {
4652
log.Fatal(err)

0 commit comments

Comments
 (0)