News for hackers. Stuff that matters.
Re:Show HN: I wrote a book about Go by Jtsummers on Wednesday March 24, 2021 @09:37PM (#26575569)

  cart.Cart
  package.NameInPackage
So the name Cart is an interface, the function/method signatures are indicating that a Cart is being returned but being explicit about the package the interface belongs to with cart.Cart. It's made more confusing since the name cart (lower-c) is being used for both a member variable and the package name in the signature of Put, and it looks like the package name doesn't show up on an explicit line in that chapter to help clarify it.

There are no comments on this comment yet.