Casting (?) to Interface?

I have a repository interface and an implementing mysql version (no problem). However when I try to assign the concrete mysql version to a struct property that takes the interface, I can’t.

type Server struct{
Repo: repository.Repo (interface)
}

s := Server{Repo:mysql.Repo{}} implementing struct instance

Thank you for any help in advance

I had a pointer receiver as implementing interface, sorry

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.