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 no
чт, 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 passe
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 li
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 :=
strings.Split(runtime.FuncForPC(reflect.ValueOf(iface).P