{"action":"opened","issue":{"url":"https://api.github.com/repos/go-resty/resty/issues/178","repository_url":"https://api.github.com/repos/go-resty/resty","labels_url":"https://api.github.com/repos/go-resty/resty/issues/178/labels{/name}","comments_url":"https://api.github.com/repos/go-resty/resty/issues/178/comments","events_url":"https://api.github.com/repos/go-resty/resty/issues/178/events","html_url":"https://github.com/go-resty/resty/issues/178","id":353533913,"node_id":"MDU6SXNzdWUzNTM1MzM5MTM=","number":178,"title":"Go Module","user":{"login":"cimnine","id":804532,"node_id":"MDQ6VXNlcjgwNDUzMg==","avatar_url":"https://avatars0.githubusercontent.com/u/804532?v=4","gravatar_id":"","url":"https://api.github.com/users/cimnine","html_url":"https://github.com/cimnine","followers_url":"https://api.github.com/users/cimnine/followers","following_url":"https://api.github.com/users/cimnine/following{/other_user}","gists_url":"https://api.github.com/users/cimnine/gists{/gist_id}","starred_url":"https://api.github.com/users/cimnine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cimnine/subscriptions","organizations_url":"https://api.github.com/users/cimnine/orgs","repos_url":"https://api.github.com/users/cimnine/repos","events_url":"https://api.github.com/users/cimnine/events{/privacy}","received_events_url":"https://api.github.com/users/cimnine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-23T20:06:43Z","updated_at":"2018-08-23T20:06:43Z","closed_at":null,"author_association":"NONE","body":"The documentation suggests that one should use resty as follows:\r\n\r\n```\r\nimport \"gopkg.in/resty.v1\"\r\n```\r\n\r\n(https://github.com/go-resty/resty/blob/ec17de1c59a99e0743dac77aaab6435f364fdc42/README.md#usage)\r\n\r\nBut this brakes with Go modules, because `go.mod` declares the module as follows:\r\n\r\nhttps://github.com/go-resty/resty/blob/ec17de1c59a99e0743dac77aaab6435f364fdc42/go.mod#L1\r\n\r\nThis causes troubles when I try to compile code with go11.1rc2 and go modules enabled.\r\n\r\nAll is fine when I import resty like this:\r\n\r\n```go\r\nimport \"github.com/go-resty/resty\"\r\n```\r\n\r\nNow there are two options:\r\n\r\na) Adjust the documentation and suggest to `import \"github.com/go-resty/resty\"`\r\nb) Adjust the `go.mod` to be `module \"gopkg.in/resty.v1`\r\n\r\nOption (a) is good for all new project that start with go modules right away, but it's backward incompatible.\r\nOption (b) would be good for projects that used plain `go get` or `dep` until now and upgrade to `go.mod`, because they don't have to change all the import statements. There are no further drawbacks, except that this option needs a new release with an updated `go.mod`."}}
{"actor":{"display_login":"cimnine"}}