Created
March 16, 2017 18:32
-
-
Save jeremylowery/920d8c62bc7daa3bf49c5d508c22f6bf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Provider interface for your object | |
type PatientProvider interface { | |
PatientByID(id int) Patient | |
InactivePatients() []Patient | |
} | |
// Dependency interface needed by object | |
type SQLExecutor interface { | |
ExecuteSQL(sql string) []SQLRecord | |
} | |
// Given for completeness | |
type Patient struct { | |
Id int | |
name string | |
} | |
type SQLRecord []interface{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment