gotransip
gotransip copied to clipboard
Fix error message when no private key is provided
Short description
This error had me confused for a minute. Had to read this file to realize that I passed an empty string as PrivateKeyPath
Checklist
- [x] I read the CONTRIBUTING.md document
- [x] This code actually compiles
- [x] This code solves my problem
- [ ] I've updated the inline documentation
- [ ] I added or modified test(s) to prevent this issue from ever occuring again
Last 2 are not really applicable 😃
Hi @seveas,
This will make the test expecting that error also fail. Could you also change that test?
--- FAIL: TestNewClient (0.00s)
client_test.go:48:
Error Trace: client_test.go:48
Error: Error message not equal:
expected: "PrivateKeyReader, token or PrivateKeyReader is required"
actual : "PrivateKeyPath, token or PrivateKeyReader is required"
Test: TestNewClient
FAIL
Certainly! Apologies for the sloppy pr.