Hi Christian,
You’re right on this, but my question is about another aspect. The thread
starter’s question was about using structs for namespaces (instead of
packages). My question is, why would someone want to use empty structs for
creating a name space if a package already does this. After
Hi,
For starters, packages can't implement interfaces.
Cheers,
On Friday, August 5, 2016 at 6:19:31 AM UTC+2, Christoph Berger wrote:
>
> Are there any advantages over using real packages?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
Are there any advantages over using real packages?
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@googlegroups.com.
For more options,
Personally I do that (despite that everyone advocates against it). Just
remember your struct should be just "struct{}" and nothing else. This
helped me to use shorter & cleaner names for my functions - actually it
converts a function pile to a batch of functions).
On Wednesday, August 3, 2016