Can you help me understand this code on interfaces? If you were calling (CartStore.GetById()) where does (*cart.Cart) come from? I don't see any logical connection between these two.
type Cart interface {
GetById(ID string) (*cart.Cart, error)
Put(cart *cart.Cart) (*cart.Cart, error)
}
// A type that implements the interface :
type CartStore struct{}
func (c *CartStore) GetById(ID string) (*cart.Cart, error) {
// implement me
}
func (c *CartStore) Put(cart *cart.Cart) (\*cart.Cart, error){
// implement me
}