Last active
August 9, 2020 06:35
-
-
Save ShaileshSurya/e70679cace89e0c44dd99f7723f9e986 to your computer and use it in GitHub Desktop.
Consuming dependFactory before adding mockstruct.
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 main | |
import ( | |
"fmt" | |
factory "github.com/ShaileshSurya/go-external-mocking/dependfactory" | |
) | |
func main() { | |
external := factory.GetExternal() | |
err := external.DependencyFunction() | |
if err != nil { | |
fmt.Println("Error from dependency function") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created as part of medium post on "Mocking External Dependencies in Go"