Skip to content

Instantly share code, notes, and snippets.

@ShaileshSurya
Last active August 9, 2020 06:19
Show Gist options
  • Save ShaileshSurya/ab37f49946c502d7b3bc7e3b130e1850 to your computer and use it in GitHub Desktop.
Save ShaileshSurya/ab37f49946c502d7b3bc7e3b130e1850 to your computer and use it in GitHub Desktop.
Empty struct implementing interface_external
package dependfactory
import (
"github.com/ShaileshSurya/go-external-mocking/dependfactory/interfacer"
dep "github.com/ShaileshSurya/go-external-mocking/external"
)
// External ...
type External struct {
interfacer.External
}
// DependencyFunction ...
func (e External) DependencyFunction() error {
return dep.DependencyFunction()
}
@ShaileshSurya
Copy link
Author

Created as a part of Medium post "Mocking External Dependencies in Go"

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