"You can accept a struct where an interface is a parameter but you cannot return a struct where an interface is the return type."
Possibly I'm misunderstanding the complaint, but that is because an interface is a fat pointer, so one returns a pointer to a struct implementing the interface.
https://go.dev/play/p/YOa6NF7rjPF