Re: [go-nuts] get interface and method name

2019-07-12 Thread Martin Schnabel
Because AccountService.Create is a method expression you can get to the interface type by inspecting its first argument. Then you could check the interface type for all methods and compare the input and output parameters. This however is brittle and only works if you can guarantee that there is

Re: [go-nuts] get interface and method name

2019-07-12 Thread Vasiliy Tolstov
чт, 11 июл. 2019 г. в 00:27, Ian Lance Taylor : > > On Wed, Jul 10, 2019 at 1:40 PM Vasiliy Tolstov wrote: > > > > Hi! i have interface like > > > > type AccountService interface { > > Create(context.Context) error > > } > > > > if i need to get string representation of this interface from

Re: [go-nuts] get interface and method name

2019-07-10 Thread Ian Lance Taylor
On Wed, Jul 10, 2019 at 1:40 PM Vasiliy Tolstov wrote: > > Hi! i have interface like > > type AccountService interface { > Create(context.Context) error > } > > if i need to get string representation of this interface from passed > AccountService.Create how can i do that? > > Now i create POC

[go-nuts] get interface and method name

2019-07-10 Thread Vasiliy Tolstov
Hi! i have interface like type AccountService interface { Create(context.Context) error } if i need to get string representation of this interface from passed AccountService.Create how can i do that? Now i create POC like this: parts :=