Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on programming.dev

10 replies

Apparently this repo is NOT any sort of standard, yet a lot of people are fooled to believe that based on the repo’s account name and the project’s name. I see this mentioned whenever this is asked… just an FYI…

5
foehammerreply
programming.dev

Some aspects of that repo are actually language features, such as the pkg and internal directories.

3
programming.dev

pkg/ isn't a language feature. It's just a popular convention that used to be used in the Go standard library.

2
foehammerreply
programming.dev

The language feature is the internal/ directory, and it's function of restricting dependencies from external programs.

1

That is correct, internal/ is a feature. I was just clarifying that the pkg/ folder isn’t any sort of language feature as you had said it was.

2

I often point to Upspin as it's a real-world Go project by folks closely related to the Go project (including Rob Pike).

1

You reached the end

Is there a repository of best practices when it comes to Go? (project/file structure, decoupling) | Spyke