Of course. When you "pass a value whose type implements the interface" as an interface argument to a function, you in fact pass an *interface*.
воскресенье, 9 декабря 2018 г., 23:23:41 UTC+3 пользователь Mark Volkmann написал: > > Is it possible to pass an interface to a function in Go? I don’t want to > pass a value whose type implements the interface, I want to pass the > interface. > > -- > R. Mark Volkmann > Object Computing, Inc. > -- 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, visit https://groups.google.com/d/optout.