mercredi 22 mars 2017

Is it possible to mock a function imported from a package in golang?

I have the following method to test, which uses a function imported from a package.

import x.y.z

func abc() {
    ...
    v := z.SomeFunc()
    ... 
}

Is it possible to mock SomeFunc() in golang?

Aucun commentaire:

Enregistrer un commentaire