Skip to content

Instantly share code, notes, and snippets.

@ShaileshSurya
Last active August 9, 2020 06:22
Show Gist options
  • Save ShaileshSurya/bafd042305c2a626650d79064ae39bf1 to your computer and use it in GitHub Desktop.
Save ShaileshSurya/bafd042305c2a626650d79064ae39bf1 to your computer and use it in GitHub Desktop.
Interface encapsulating external dependency.
package interfacer
// External interface encaspulates the actual dependency function.
type External interface {
DependencyFunction() (err error)
}
@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