Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'go get' fails when '?' in file path inside of module #30854

Closed
clarsen opened this issue Mar 14, 2019 · 2 comments
Closed

'go get' fails when '?' in file path inside of module #30854

clarsen opened this issue Mar 14, 2019 · 2 comments

Comments

@clarsen
Copy link

clarsen commented Mar 14, 2019

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

$ go version
go version go1.12 darwin/amd64

Does this issue reproduce with the latest release?

yes, in 1.12

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

go env Output
$ go env
GOARCH="amd64"
GOBIN="/Users/clarsen/lsrc/go/bin"
GOCACHE="/Users/clarsen/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/clarsen/lsrc/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/clarsen/lsrc/go/src/github.com/clarsen/go-trello-workflow/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/mx/gr33pns500xgxj5cyvfnx6tw0000gn/T/go-build927821387=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

export GO111module=on
go get github.com/dougEfresh/gtoggl-api

I believe issue is that file in https://github.com/dougEfresh/gtoggl-api/tree/master/gttimentry/mock/GET/api/v8 has a '?' in the filename.

What did you expect to see?

successful import

What did you see instead?

go: finding github.com/dougEfresh/gtoggl-api latest
go: extracting github.com/dougEfresh/gtoggl-api v0.0.0-20181029170833-3dde07b8438e
-> unzip /Users/clarsen/lsrc/go/pkg/mod/cache/download/github.com/doug!efresh/gtoggl-api/@v/v0.0.0-20181029170833-3dde07b8438e.zip: malformed file path "gttimentry/mock/GET/api/v8/time_entries?end_date=2013-03-12T15%3A42%3A46%2B02%3A00&start_date=2013-03-10T15%3A42%3A46%2B02%3A00.json": invalid char '?'
package github.com/dougEfresh/gtoggl-api: unknown import path "github.com/dougEfresh/gtoggl-api": unzip /Users/clarsen/lsrc/go/pkg/mod/cache/download/github.com/doug!efresh/gtoggl-api/@v/v0.0.0-20181029170833-3dde07b8438e.zip: malformed file path "gttimentry/mock/GET/api/v8/time_entries?end_date=2013-03-12T15%3A42%3A46%2B02%3A00&start_date=2013-03-10T15%3A42%3A46%2B02%3A00.json": invalid char '?'
@clarsen clarsen changed the title go get fails when '?' in file path inside of module 'go get' fails when '?' in file path inside of module Mar 14, 2019
@agnivade
Copy link
Contributor

/cc @bcmills

@bcmills
Copy link
Contributor

bcmills commented Mar 15, 2019

The error message here is clear and intentional: the character ? is not allowed in files within a module. That character is one of many disallowed on Windows filesystems, and we require that module contents be portable across platforms.

@bcmills bcmills closed this as completed Mar 15, 2019
@golang golang locked and limited conversation to collaborators Mar 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants