{"action":"created","issue":{"url":"https://api.github.com/repos/petergtz/pegomock/issues/69","repository_url":"https://api.github.com/repos/petergtz/pegomock","labels_url":"https://api.github.com/repos/petergtz/pegomock/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/petergtz/pegomock/issues/69/comments","events_url":"https://api.github.com/repos/petergtz/pegomock/issues/69/events","html_url":"https://github.com/petergtz/pegomock/issues/69","id":356766686,"node_id":"MDU6SXNzdWUzNTY3NjY2ODY=","number":69,"title":"Users need to specify too many different options to generate mocks in different directories","user":{"login":"jszroberto","id":1674893,"node_id":"MDQ6VXNlcjE2NzQ4OTM=","avatar_url":"https://avatars0.githubusercontent.com/u/1674893?v=4","gravatar_id":"","url":"https://api.github.com/users/jszroberto","html_url":"https://github.com/jszroberto","followers_url":"https://api.github.com/users/jszroberto/followers","following_url":"https://api.github.com/users/jszroberto/following{/other_user}","gists_url":"https://api.github.com/users/jszroberto/gists{/gist_id}","starred_url":"https://api.github.com/users/jszroberto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jszroberto/subscriptions","organizations_url":"https://api.github.com/users/jszroberto/orgs","repos_url":"https://api.github.com/users/jszroberto/repos","events_url":"https://api.github.com/users/jszroberto/events{/privacy}","received_events_url":"https://api.github.com/users/jszroberto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-04T11:26:10Z","updated_at":"2018-09-14T09:32:50Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Hi Peter, \r\n\r\nTrying to generate a mock in a fakes folder (e.g. `$(PWD)/fakes/mock_<INTERFACE>_test.go`),  I had several several options that for me look redundant. \r\n\r\n`//go:generate pegomock generate --package fakes Namespacer -o fakes/mock_namespacer_test.go`\r\n\r\nI would expect the UX to be something like: \r\n`pegomock generate --package fakes Namespacer`\r\nor `pegomock generate --output fakes/ Namespacer`\r\n\r\nMaybe I didn't understand completely how the options in `pegomock generate` work."},"comment":{"url":"https://api.github.com/repos/petergtz/pegomock/issues/comments/421293259","html_url":"https://github.com/petergtz/pegomock/issues/69#issuecomment-421293259","issue_url":"https://api.github.com/repos/petergtz/pegomock/issues/69","id":421293259,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTI5MzI1OQ==","user":{"login":"petergtz","id":3618401,"node_id":"MDQ6VXNlcjM2MTg0MDE=","avatar_url":"https://avatars0.githubusercontent.com/u/3618401?v=4","gravatar_id":"","url":"https://api.github.com/users/petergtz","html_url":"https://github.com/petergtz","followers_url":"https://api.github.com/users/petergtz/followers","following_url":"https://api.github.com/users/petergtz/following{/other_user}","gists_url":"https://api.github.com/users/petergtz/gists{/gist_id}","starred_url":"https://api.github.com/users/petergtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petergtz/subscriptions","organizations_url":"https://api.github.com/users/petergtz/orgs","repos_url":"https://api.github.com/users/petergtz/repos","events_url":"https://api.github.com/users/petergtz/events{/privacy}","received_events_url":"https://api.github.com/users/petergtz/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T09:32:50Z","updated_at":"2018-09-14T09:32:50Z","author_association":"OWNER","body":"Hi Roberto, the reason why it is separate is that folder name must not necessarily match package name. Your generate command could also be:\r\n```\r\n//go:generate pegomock generate --package namespacer_fakes Namespacer -o fakes/mock_namespacer_test.go\r\n```\r\n\r\nI guess, since the output folder cannot be properly \"guessed\", the `--output` option cannot be omitted. But what we could do is that if there is no `--package` option, it could check if there is an `--output` option and use the folder name as package name.\r\n\r\nWhat do you think?"}}
{"actor":{"display_login":"petergtz"}}