Skip to content

Instantly share code, notes, and snippets.

@ShaileshSurya
Last active August 9, 2020 06:35
Show Gist options
  • Save ShaileshSurya/e70679cace89e0c44dd99f7723f9e986 to your computer and use it in GitHub Desktop.
Save ShaileshSurya/e70679cace89e0c44dd99f7723f9e986 to your computer and use it in GitHub Desktop.
Consuming dependFactory before adding mockstruct.
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")
}
}
@ShaileshSurya
Copy link
Author

ShaileshSurya commented Oct 20, 2019

Created as part of medium post on "Mocking External Dependencies in Go"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment