DEV Community

loading...

Discussion on: Go - Considering package name.

Collapse
konart profile image
Artem Kondratev • Edited

If I use packages only in my application, do I not need to think?

Name them so that anyone can understand.

If you have an internal package http (let's assume that's the best name somehow) under internal/ packages folder than you can just give in an alias during an import.

If the package is intended to be used (can be used) by other dev's you better think of those things you've mentioned but in the end it's their job to keep their code clean.

Collapse
takakd profile image
Takahiro Kudo Author

Oh, internal/ is easy to understand.
That's a good idea, I thought too.
Thanks for your feedback!

Collapse
konart profile image
Artem Kondratev

github.com/golang-standards/projec...

This repo has a layout example for Go application projects. We often use it within our team. Get a look!

Thread Thread
takakd profile image
Takahiro Kudo Author

Thank you for introducing helpful resources.
I'll try it!