ooni-probe-cli/internal/netxlite/mocks
Simone Basso 560b1a9a97
fix(filtering): avoid the if err == nil pattern (#567)
1. in normal code is better to always do if err != nil so that
the ifs only contain error code (this is ~coding policy)

2. in tests we want to ensure we narrow down the error to the
real error that happened, to have greater confidence

Written while working on https://github.com/ooni/probe/issues/1803#issuecomment-957323297
2021-11-02 19:48:10 +01:00
..
dialer_test.go refactor(netxlite/mocks): group tests, fix naming inconsistencies (#485) 2021-09-07 23:12:23 +02:00
dialer.go refactor(netxlite/mocks): group tests, fix naming inconsistencies (#485) 2021-09-07 23:12:23 +02:00
dnsdecoder_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsdecoder.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsencoder_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnsencoder.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnstransport_test.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
dnstransport.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
doc.go refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
http_test.go refactor(netx/resolver): add CloseIdleConnections to RoundTripper (#501) 2021-09-09 20:49:12 +02:00
http.go refactor(netx/resolver): add CloseIdleConnections to RoundTripper (#501) 2021-09-09 20:49:12 +02:00
http3_test.go refactor(netxlite): improve tests for http and http3 (#487) 2021-09-08 00:59:48 +02:00
http3.go refactor(netxlite): improve tests for http and http3 (#487) 2021-09-08 00:59:48 +02:00
legacy_test.go refactor(netxlite/mocks): group tests, fix naming inconsistencies (#485) 2021-09-07 23:12:23 +02:00
legacy.go feat(netxlite): add CloseIdleConnections to quic dialer (#469) 2021-09-06 20:56:14 +02:00
listener_test.go fix(filtering): avoid the if err == nil pattern (#567) 2021-11-02 19:48:10 +01:00
listener.go fix(filtering): avoid the if err == nil pattern (#567) 2021-11-02 19:48:10 +01:00
logger_test.go netxlite: improve docs, tests, and code quality (#493) 2021-09-08 21:19:51 +02:00
logger.go netxlite: improve docs, tests, and code quality (#493) 2021-09-08 21:19:51 +02:00
quic_test.go refactor(netxlite/mocks): group tests, fix naming inconsistencies (#485) 2021-09-07 23:12:23 +02:00
quic.go refactor(netxlite/mocks): group tests, fix naming inconsistencies (#485) 2021-09-07 23:12:23 +02:00
reader_test.go refactor(netxlite/mocks): group tests, fix naming inconsistencies (#485) 2021-09-07 23:12:23 +02:00
reader.go refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
resolver_test.go feat(netxlite): implement LookupHTTPS (#514) 2021-09-27 23:09:41 +02:00
resolver.go refactor: merge dnsx and errorsx into netxlite (#517) 2021-09-28 12:42:01 +02:00
tls_test.go refactor(netxlite/mocks): group tests, fix naming inconsistencies (#485) 2021-09-07 23:12:23 +02:00
tls.go fix(netxlite): http factory that propagates close-idle-connections (#465) 2021-09-06 16:53:28 +02:00