dockertest
dockertest copied to clipboard
use defer instead of os.Exit(m.Run())
as of go1.15 testing.M
returns the return code of m.Run()
, so it is possible to use defer
Related Issue or Design Document
https://github.com/golang/go/issues/34129
Checklist
- [x] I have read the contributing guidelines and signed the CLA.
- [ ] I have referenced an issue containing the design document if my change introduces a new feature.
- [x] I have read the security policy.
- [x] I confirm that this pull request does not address a security vulnerability. If this pull request addresses a security vulnerability, I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
- [x] I have added tests that prove my fix is effective or that my feature works.
- [x] I have added the necessary documentation within the code base (if appropriate).
Further comments
n/a
this fails on something unrelated to the PR:
Error: ../../../go/pkg/mod/github.com/docker/[email protected]+incompatible/cli/compose/template/template.go:242:14: undefined: strings.Cut
do you want me to fix the issue in this PR or a separate one?
This is a good improvement. Would you mind rebasing to get rid of the updated Copyright headers?
This is a good improvement. Would you mind rebasing to get rid of the updated Copyright headers?
Seems like you did this already. Let me know if there is anything else I should do...