(options ...MockBackendOption)
| 727 | } |
| 728 | |
| 729 | func NewMockedHTTPClient(options ...MockBackendOption) *http.Client { |
| 730 | handlers := map[string]http.HandlerFunc{} |
| 731 | for _, opt := range options { |
| 732 | if opt != nil { |
| 733 | opt(handlers) |
| 734 | } |
| 735 | } |
| 736 | return MockHTTPClientWithHandlers(handlers) |
| 737 | } |
| 738 | |
| 739 | func MustMarshal(v any) []byte { |
| 740 | data, err := json.Marshal(v) |
no test coverage detected