Go: x/net: The httplex package was moved by googlegit

Created on 23 May 2018  ·  1Comment  ·  Source: golang/go

What version of Go are you using (go version)?

go version go1.9.2 linux/amd64

Does this issue reproduce with the latest release?

It's doesn't matter to the latest version.

What operating system and processor architecture are you using (go env)?

[root@host-172-19-146-103 netplugin]# go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/contiv/"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build112525786=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

What did you do?

  1. go get -u golang.org/x/net/lex/httplex
  2. the result with above step:
    [root@host-172-19-146-103 netplugin]# go get golang.org/x/net/lex/httplex
    package golang.org/x/net/lex/httplex: cannot find package "golang.org/x/net/lex/httplex" in any of:
    /usr/local/go/src/golang.org/x/net/lex/httplex (from $GOROOT)
    /root/contiv/src/golang.org/x/net/lex/httplex (from $GOPATH)
  3. check the package in the googlegit, and we found the commit:
    lex/httplex, http/httpguts: merge the httplex package into httpguts

    httplex was the original package name for shared code between net/http
    and x/net/http2, but its name was too specific, and http/httpguts was
    added later for other shared code.

    We discussed merging httplex into httpguts at the time, but it didn't
    happen earlier. This finishes the move.

    Updates golang/go#23908
    The package name already has been move to the http/httpguts/.
    So that, wo can not found them in the master branch.

  4. I suggest that modify the import path in four files.
    /contiv-netplugin-etcdv3/netplugin/vendor/golang.org/x/net/http2/frame.go:
    16
    17 "golang.org/x/net/http2/hpack"
    18: "golang.org/x/net/lex/httplex"
    19 )
    20

/contiv-netplugin-etcdv3/netplugin/vendor/golang.org/x/net/http2/http2.go:
30 "sync"
31
32: "golang.org/x/net/lex/httplex"
33 )
34

/contiv-netplugin-etcdv3/netplugin/vendor/golang.org/x/net/http2/transport.go:
29 "golang.org/x/net/http2/hpack"
30 "golang.org/x/net/idna"
31: "golang.org/x/net/lex/httplex"
32 )
33

/contiv-netplugin-etcdv3/netplugin/vendor/golang.org/x/net/http2/write.go:
14
15 "golang.org/x/net/http2/hpack"
16: "golang.org/x/net/lex/httplex"
17 )
18

What did you expect to see?

go get normal

What did you see instead?

  1. I suggest that modify the import path in four files.
    /contiv-netplugin-etcdv3/netplugin/vendor/golang.org/x/net/http2/frame.go:
    16
    17 "golang.org/x/net/http2/hpack"
    18: "golang.org/x/net/lex/httplex"
    19 )
    20

/contiv-netplugin-etcdv3/netplugin/vendor/golang.org/x/net/http2/http2.go:
30 "sync"
31
32: "golang.org/x/net/lex/httplex"
33 )
34

/contiv-netplugin-etcdv3/netplugin/vendor/golang.org/x/net/http2/transport.go:
29 "golang.org/x/net/http2/hpack"
30 "golang.org/x/net/idna"
31: "golang.org/x/net/lex/httplex"
32 )
33

/contiv-netplugin-etcdv3/netplugin/vendor/golang.org/x/net/http2/write.go:
14
15 "golang.org/x/net/http2/hpack"
16: "golang.org/x/net/lex/httplex"
17 )
18

FrozenDueToAge NeedsInvestigation

>All comments

invaild bug, Please close it.

Was this page helpful?
0 / 5 - 0 ratings