New creates a new IDResolver.
(apiClient client.APIClient, noResolve bool)
| 20 | |
| 21 | // New creates a new IDResolver. |
| 22 | func New(apiClient client.APIClient, noResolve bool) *IDResolver { |
| 23 | return &IDResolver{ |
| 24 | client: apiClient, |
| 25 | noResolve: noResolve, |
| 26 | cache: make(map[string]string), |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | func (r *IDResolver) get(ctx context.Context, t any, id string) (string, error) { |
| 31 | switch t.(type) { |
no outgoing calls