Created
December 16, 2014 13:11
-
-
Save ngauthier/dd460f72d954c3bd654b to your computer and use it in GitHub Desktop.
go dep inj via interface and constructor
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 athena | |
import ( | |
accountant "codeship-accountant", | |
janus "codeship-janus", | |
ares "ares-api" | |
) | |
func main() { | |
// codeship accountant implements accountant interface | |
accountant := accountant.New() | |
// codeship janus implements janus interface | |
janus := janus.New() | |
// this is a general purpose ares api for stuff or whatever | |
ares := ares.New() | |
athena.New(accountant, janus, ares) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment