(ctx context.Context)
| 930 | } |
| 931 | |
| 932 | func (p *joined) await(ctx context.Context) (Response, error) { |
| 933 | results := make([]interface{}, len(p.promises)) |
| 934 | |
| 935 | for i, sub := range p.promises { |
| 936 | m, err := sub.await(ctx) |
| 937 | if err != nil { |
| 938 | results[i] = err |
| 939 | } else { |
| 940 | results[i] = m |
| 941 | } |
| 942 | } |
| 943 | |
| 944 | return p.merger.Merge(p.requests, results) |
| 945 | } |
| 946 | |
| 947 | // Default dialer used by the transport connections when no Dial function |
| 948 | // was configured by the program. |