w.imported[name] = &importing
root := w.root
- if strings.HasPrefix(name, "golang.org/x/") {
+ if strings.HasPrefix(name, "golang_org/x/") {
root = filepath.Join(root, "vendor")
}
testenv.MustHaveGoBuild(t) // really must just have source
ctxt := Default
ctxt.GOPATH = ""
- p, err := ctxt.Import("golang.org/x/net/http2/hpack", filepath.Join(ctxt.GOROOT, "src/net/http"), 0)
+ p, err := ctxt.Import("golang_org/x/net/http2/hpack", filepath.Join(ctxt.GOROOT, "src/net/http"), 0)
if err != nil {
- t.Fatalf("cannot find vendored golang.org/x/net/http2/hpack from net/http directory: %v", err)
+ t.Fatalf("cannot find vendored golang_org/x/net/http2/hpack from net/http directory: %v", err)
}
- want := "vendor/golang.org/x/net/http2/hpack"
+ want := "vendor/golang_org/x/net/http2/hpack"
if p.ImportPath != want {
t.Fatalf("Import succeeded but found %q, want %q", p.ImportPath, want)
}
ctxt := Default
ctxt.GOPATH = ""
// This import should fail because the vendor/golang.org/x/net/http2 directory has no source code.
- p, err := ctxt.Import("golang.org/x/net/http2", filepath.Join(ctxt.GOROOT, "src/net/http"), 0)
+ p, err := ctxt.Import("golang_org/x/net/http2", filepath.Join(ctxt.GOROOT, "src/net/http"), 0)
if err == nil {
t.Fatalf("found empty parent in %s", p.Dir)
}
"context", "math/rand", "os", "sort", "syscall", "time",
"internal/nettrace",
"internal/syscall/windows", "internal/singleflight", "internal/race",
- "golang.org/x/net/route",
+ "golang_org/x/net/route",
},
// NET enables use of basic network-related packages.
"context", "compress/gzip", "container/list", "crypto/tls",
"mime/multipart", "runtime/debug",
"net/http/internal",
- "golang.org/x/net/http2/hpack",
- "golang.org/x/net/lex/httplex",
+ "golang_org/x/net/http2/hpack",
+ "golang_org/x/net/lex/httplex",
"internal/nettrace",
"net/http/httptrace",
},
}
name := filepath.ToSlash(path[len(src):])
- if name == "builtin" || name == "cmd" || strings.Contains(name, ".") {
+ if name == "builtin" || name == "cmd" || strings.Contains(name, "golang_org") {
return filepath.SkipDir
}
"sync"
"time"
- "golang.org/x/net/http2/hpack"
- "golang.org/x/net/lex/httplex"
+ "golang_org/x/net/http2/hpack"
+ "golang_org/x/net/lex/httplex"
)
// ClientConnPool manages a pool of HTTP/2 client connections.
import (
"strings"
- "golang.org/x/net/lex/httplex"
+ "golang_org/x/net/lex/httplex"
)
// maxInt64 is the effective "infinite" value for the Server and
"sync/atomic"
"time"
- "golang.org/x/net/lex/httplex"
+ "golang_org/x/net/lex/httplex"
)
// Errors used by the HTTP server.
"strings"
"sync"
- "golang.org/x/net/lex/httplex"
+ "golang_org/x/net/lex/httplex"
)
// ErrLineTooLong is returned when reading request or response bodies
"sync"
"time"
- "golang.org/x/net/lex/httplex"
+ "golang_org/x/net/lex/httplex"
)
// DefaultTransport is the default implementation of Transport and is
import (
"syscall"
- "golang.org/x/net/route"
+ "golang_org/x/net/route"
)
// If the ifindex is zero, interfaceTable returns mappings of all
import (
"syscall"
- "golang.org/x/net/route"
+ "golang_org/x/net/route"
)
func interfaceMessages(ifindex int) ([]route.Message, error) {
import (
"syscall"
- "golang.org/x/net/route"
+ "golang_org/x/net/route"
)
func interfaceMessages(ifindex int) ([]route.Message, error) {
import (
"syscall"
- "golang.org/x/net/route"
+ "golang_org/x/net/route"
)
func interfaceMessages(ifindex int) ([]route.Message, error) {