cloudflare / hellogopher

Hellogopher: "just clone and make" your conventional Go project
MIT License
1.15k stars 59 forks source link

make should honor source files in src folder #10

Closed lotharschulz closed 7 years ago

lotharschulz commented 7 years ago

I experienced the make command only working correctly if go source file(s) is/are located in root folder of a repository.

make on lotharschulz/gohello02@tag/0.0.1 worked correctly only because of https://github.com/lotharschulz/gohello02/commit/cc13b57d243618756e8a93d8b1153f1211aa82e4

FiloSottile commented 7 years ago

Hi! Thanks for trying hellogopher :)

Hellogopher is meant to work on projects that follow the conventional Go structure, which doesn't include a src/ or github.com/ subfolder.

However, code doesn't have to be in the project root. You can add the subpath like the otherbin target does.

However, that commit looks right: before, the name of your package was github.com/lotharschulz/gohello02/src/github.com/lotharschulz/gohello02.

lotharschulz commented 7 years ago

https://github.com/cloudflare/hellogopher/commit/3209e97ba67bc32758133989837f6f5f9117ceef clarifies things - thanks.

However according to https://golang.org/doc/code.html#Workspaces the conventional Go structure includes srcfolders.

FiloSottile commented 7 years ago

That's correct, however the workspace refers to your system environment, not to the one you make inside the repository. The repository goes inside src, not the other way around.

Let me know if you can think of a wording to further clarify that.

Sent from a small keyboard

On 23 Jan 2017, at 18:34, lothar schulz notifications@github.com wrote:

3209e97 clarifies things - thanks.

However according to https://golang.org/doc/code.html#Workspaces the conventional Go structure includes srcfolders.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.