{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/27951","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/27951/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/27951/comments","events_url":"https://api.github.com/repos/golang/go/issues/27951/events","html_url":"https://github.com/golang/go/issues/27951","id":365462958,"node_id":"MDU6SXNzdWUzNjU0NjI5NTg=","number":27951,"title":"cmd/go: go mod init fails to determine module path in subdirectory","user":{"login":"andig","id":184815,"node_id":"MDQ6VXNlcjE4NDgxNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/184815?v=4","gravatar_id":"","url":"https://api.github.com/users/andig","html_url":"https://github.com/andig","followers_url":"https://api.github.com/users/andig/followers","following_url":"https://api.github.com/users/andig/following{/other_user}","gists_url":"https://api.github.com/users/andig/gists{/gist_id}","starred_url":"https://api.github.com/users/andig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andig/subscriptions","organizations_url":"https://api.github.com/users/andig/orgs","repos_url":"https://api.github.com/users/andig/repos","events_url":"https://api.github.com/users/andig/events{/privacy}","received_events_url":"https://api.github.com/users/andig/received_events","type":"User","site_admin":false},"labels":[{"id":373399998,"node_id":"MDU6TGFiZWwzNzMzOTk5OTg=","url":"https://api.github.com/repos/golang/go/labels/NeedsFix","name":"NeedsFix","color":"ededed","default":false},{"id":992189327,"node_id":"MDU6TGFiZWw5OTIxODkzMjc=","url":"https://api.github.com/repos/golang/go/labels/modules","name":"modules","color":"bac2ff","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/83","html_url":"https://github.com/golang/go/milestone/83","labels_url":"https://api.github.com/repos/golang/go/milestones/83/labels","id":3730798,"node_id":"MDk6TWlsZXN0b25lMzczMDc5OA==","number":83,"title":"Go1.13","description":null,"creator":{"login":"rsc","id":104030,"node_id":"MDQ6VXNlcjEwNDAzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":165,"closed_issues":12,"state":"open","created_at":"2018-10-11T15:30:19Z","updated_at":"2018-11-23T19:10:14Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2018-10-01T13:31:29Z","updated_at":"2018-11-24T03:33:01Z","closed_at":null,"author_association":"NONE","body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n\r\n### What version of Go are you using (`go version`)?\r\n1.11\r\n\r\n\r\n### Does this issue reproduce with the latest release?\r\nyes\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\n\r\n    ❯ go env\r\n    GOARCH=\"amd64\"\r\n    GOBIN=\"\"\r\n    GOCACHE=\"/Users/andig/Library/Caches/go-build\"\r\n    GOEXE=\"\"\r\n    GOFLAGS=\"\"\r\n    GOHOSTARCH=\"amd64\"\r\n    GOHOSTOS=\"darwin\"\r\n    GOOS=\"darwin\"\r\n    GOPATH=\"/Users/andig/go\"\r\n    GOPROXY=\"\"\r\n    GORACE=\"\"\r\n    GOROOT=\"/usr/local/Cellar/go/1.11/libexec\"\r\n    GOTMPDIR=\"\"\r\n    GOTOOLDIR=\"/usr/local/Cellar/go/1.11/libexec/pkg/tool/darwin_amd64\"\r\n    GCCGO=\"gccgo\"\r\n    CC=\"clang\"\r\n    CXX=\"clang++\"\r\n    CGO_ENABLED=\"1\"\r\n    GOMOD=\"/Users/andig/htdocs/goelster/go.mod\"\r\n    CGO_CFLAGS=\"-g -O2\"\r\n    CGO_CPPFLAGS=\"\"\r\n    CGO_CXXFLAGS=\"-g -O2\"\r\n    CGO_FFLAGS=\"-g -O2\"\r\n    CGO_LDFLAGS=\"-g -O2\"\r\n    PKG_CONFIG=\"pkg-config\"\r\n    GOGCCFLAGS=\"-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/73/89ycv7qn51j4kbm04jsz9b840000gn/T/go-build453007721=/tmp/go-build -gno-record-gcc-switches -fno-common\"\r\n\r\n\r\n### What did you do?\r\n\r\nTrying to init go modules, I'm seing it fail from one folder but working from another. Both folders only contain two simple go files:\r\n\r\n    ~/htdocs/canprogs/go master*\r\n    ❯ go mod init\r\n    go: cannot determine module path for source directory /Users/andig/htdocs/canprogs/go (outside GOPATH, no import comments)\r\n\r\n    ~/htdocs/goelster master\r\n    ❯ go mod init\r\n    go: creating new go.mod: module github.com/andig/goelster\r\n\r\n    ❯ ls\r\n    elster.go main.go\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/441340801","html_url":"https://github.com/golang/go/issues/27951#issuecomment-441340801","issue_url":"https://api.github.com/repos/golang/go/issues/27951","id":441340801,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTM0MDgwMQ==","user":{"login":"rfay","id":112444,"node_id":"MDQ6VXNlcjExMjQ0NA==","avatar_url":"https://avatars2.githubusercontent.com/u/112444?v=4","gravatar_id":"","url":"https://api.github.com/users/rfay","html_url":"https://github.com/rfay","followers_url":"https://api.github.com/users/rfay/followers","following_url":"https://api.github.com/users/rfay/following{/other_user}","gists_url":"https://api.github.com/users/rfay/gists{/gist_id}","starred_url":"https://api.github.com/users/rfay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfay/subscriptions","organizations_url":"https://api.github.com/users/rfay/orgs","repos_url":"https://api.github.com/users/rfay/repos","events_url":"https://api.github.com/users/rfay/events{/privacy}","received_events_url":"https://api.github.com/users/rfay/received_events","type":"User","site_admin":false},"created_at":"2018-11-24T03:33:01Z","updated_at":"2018-11-24T03:33:01Z","author_association":"NONE","body":"It seems to me that `go mod init` is completely dependent on the existence of a git remote named \"origin\". I got the OP's output here because I only had the origins \"upstream\" and \"rfay\". Once I added an \"origin\" (equivalent to upstream), then `go mod init` worked. This doesn't seem like the behavior I'd expect."}}
{"actor":{"display_login":"rfay"}}