isSubscriptionType returns an indication if the given t is of Subscription or *Subscription type
(t reflect.Type)
| 76 | |
| 77 | // isSubscriptionType returns an indication if the given t is of Subscription or *Subscription type |
| 78 | func isSubscriptionType(t reflect.Type) bool { |
| 79 | for t.Kind() == reflect.Ptr { |
| 80 | t = t.Elem() |
| 81 | } |
| 82 | return t == subscriptionType |
| 83 | } |
| 84 | |
| 85 | // isPubSub tests whether the given method has as as first argument a context.Context |
| 86 | // and returns the pair (Subscription, error) |