If you want the interface to be interpreted as an interface value and
your parameter type is interface{}, you can pass a pointer to the
interface value and then work with that.
On Sun, 2018-12-09 at 14:23 -0600, Mark Volkmann wrote:
> Is it possible to pass an interface to a function in Go? I don’
Just declare the parameter as type Type and then in the method check if it is
an interface.
The caller uses the interface type.
> On Dec 9, 2018, at 2:43 PM, Jan Mercl <0xj...@gmail.com> wrote:
>
> On Sun, Dec 9, 2018 at 9:23 PM Mark Volkmann
> wrote:
>
> > Is it possible to pass an interf
On Sun, Dec 9, 2018 at 9:23 PM Mark Volkmann
wrote:
> 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.
I think the question is not clear enough. Could you please provide an
example of what you
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.