Created
August 9, 2020 06:44
-
-
Save ShaileshSurya/d56dc3897200c1084c92730316db5dac to your computer and use it in GitHub Desktop.
mocking_external_dependency.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mock | |
import ( | |
"errors" | |
"fmt" | |
"github.com/ShaileshSurya/go-external-mocking/dependfactory/interfacer" | |
) | |
// MockExternal ... | |
type MockExternal struct { | |
interfacer.External | |
} | |
// DependencyFunction ... | |
func (e MockExternal) DependencyFunction() error { | |
fmt.Println("Hurray Mock Dependency Fuction is called...") | |
return errors.New("Error Returning from depenedency function") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment