Close will close both a MockHttpServer and AskMocker it's super common to Close both the mock server and asker at the same time
(server *MockHttpServer, qa *AskMocker)
| 95 | // Close will close both a MockHttpServer and AskMocker |
| 96 | // it's super common to Close both the mock server and asker at the same time |
| 97 | func Close(server *MockHttpServer, qa *AskMocker) { |
| 98 | if server != nil { |
| 99 | server.Close() |
| 100 | } |
| 101 | if qa != nil { |
| 102 | qa.Close() |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | // ParseJsonStrict parses the incoming byte buffer into objects of type T, failing if any unexpected fields are present |
| 107 | func ParseJsonStrict[T any](input io.Reader) (T, error) { |