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

This repository has multiple serious issues #41

Closed
eliben opened this issue Sep 27, 2019 · 5 comments
Closed

This repository has multiple serious issues #41

eliben opened this issue Sep 27, 2019 · 5 comments

Comments

@eliben
Copy link

eliben commented Sep 27, 2019

The existence of this repository is harmful for Go beginners. People arrive here from Google searches, looking for ways to structure their small, simple packages. What they find is overwhelming, at the least.

It has several serious issues:

  1. No go.mod file, while modules are becoming a standard for Go dependency management
  2. Suggests to place all exportable code in pkg/, which is outdated advice and no longer recommended for Go projects (as it adds a superfluous path component to every import).
  3. Has a large number of directories, most of which aren't needed by 99% of projects

Please either spend some time to modernize this project, or delete it

@kcq
Copy link
Member

kcq commented Sep 27, 2019

Thank you for sharing your thoughts @eliben! I understand where you are coming from and the concerns you are raising. The main README tries to address, at least, some of them. You should leverage as much as it makes sense and for simple projects main.go in the root directory is all you'll need. However, at some point you outgrow that phase...

Note that go modules is still not officially out (even with 1.13). The blog post that goes along with the repo explicitly addresses that. I'll make sure to add a note in the main repo too. As soon as it's fully enabled the repo will be updated to reflect this feature. As a go module user myself i can tell you that it still has rough edges though :-)

The pkg pattern is the most controversial and there's a number of passionate and vocal people, who don't like it. Definitely don't use it if it doesn't make sense for you. Others find it useful though. It's ok to agree to disagree :-) The Go team itself never explicitly recommended it. This is something the core Go code had originally and then various devs in the community started using as a pattern in their Go projects.

@kcq
Copy link
Member

kcq commented Sep 27, 2019

@eliben by the way, I saw your recent blog post where you mentioned the official CommonMistakes Go page and how small it is. 50 Shades of Go has a few extras :-)

@perelin
Copy link

perelin commented Oct 23, 2020

Coming from the other side: Im a Go beginner (15ys of developing other stuff) and starting to outgrow the "main.go in root" phase. This repository gave me a nice introduction to some concepts and pointers how to structure my projects. So far I havent seen anything comparable from the official Go project team. So, thanks for the good work @kcq !

@kcq
Copy link
Member

kcq commented Apr 28, 2021

Coming from the other side: Im a Go beginner (15ys of developing other stuff) and starting to outgrow the "main.go in root" phase. This repository gave me a nice introduction to some concepts and pointers how to structure my projects. So far I havent seen anything comparable from the official Go project team. So, thanks for the good work @kcq !

It's all that matters :) If you find it useful use it (at least, some parts of it) and if not then you can ignore it.

@kcq
Copy link
Member

kcq commented Aug 24, 2023

This has been discussed enough and there's enough context for everybody to make their own mind and decide what they want to do. Intimidation, bullying and other toxic comments are not acceptable and will be removed.

@golang-standards golang-standards locked as resolved and limited conversation to collaborators Aug 24, 2023
@golang-standards golang-standards deleted a comment from tv42 Aug 24, 2023
@kcq kcq closed this as completed Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants