- Tries to listen 127.0.0.1 and the given port
- Tries to listen [::1] and the given port
- If both of them fails port-forward fails
- If at least one succeeds, port-forward listens on the corresponding interface and displays a warning for the other
- If both succeeds, port-portfward listens on both the interfaces
- When 'getent hosts localhost' returns '::1' the creation of the
listener fails because of the port parsing which uses ":" as a
separator
- Use of net.SplitHostPort() to do the job
- Adding unit tests to ensure that the creation succeeds
- On docker.go: adds a test on the presence the socat command which was
failing silenty if not installed
- Code Review 1
- Fixed typo on Expected
- The UT now fails if the PortForwarder could not be created
- Code Review 2
- Simplify socat error message
- Changing t.Fatal to to.Error on unit tests
- Code Review 3
- Removing useless uses cases in unit tests
- Code Review 4
- Removing useless initiliasiation of PortForwarder
- Changing error message
- Code Review 5
- Simplifying TestCast struct
- Adding addition test in one test case
- Closing the listener
- Code Review 6
- Improving unit test
- When 'getent hosts localhost' returns '::1' the creation of the
listener fails because of the port parsing which uses ":" as a
separator
- Use of net.SplitHostPort() to do the job
- Adding unit tests to ensure that the creation succeeds
- On docker.go: adds a test on the presence the socat command which was
failing silenty if not installed
- Code Review 1
- Fixed typo on Expected
- The UT now fails if the PortForwarder could not be created
- Code Review 2
- Simplify socat error message
- Changing t.Fatal to to.Error on unit tests
- Code Review 3
- Removing useless uses cases in unit tests
- Code Review 4
- Removing useless initiliasiation of PortForwarder
- Changing error message
- Code Review 5
- Simplifying TestCast struct
- Adding addition test in one test case
- Closing the listener
- Code Review 6
- Improving unit test
* Improper format specifier (e.g. %s for bools or %s for ints)
* More or less parameters than format specifiers
* Not calling a formatting function when it should have (e.g. Error() instead of Errorf())