Hello Community,

I'm testing out some code for increasing code coverage of our repository, 
i.e. to maximum level possible. One of the methods I'm dealing with are few 
methods in standard library (ssh, sftp) that need to be modified for custom 
behavior.

See Goplay snippet here - https://go.dev/play/p/DGYUqgEKKXh

Basically, I want to modify the type definition of `sshDialer` and 
`sftpNewClient` to return an interface that is implemented by the native 
type. If I could do this,  I would generate a mock struct satisfying the 
same interface and then perform our tests. 

I know mocking standard libraries are not the best of choice, but this is 
just to get familiar with the language and an experiment with it. 

Also would appreciate other ways to solve the same problem. Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/34727788-73b0-4928-9945-2f76a83fecddn%40googlegroups.com.

Reply via email to