Created
June 21, 2019 11:20
-
-
Save chris001177/c7df3c26c048473227bcfec495c3299f to your computer and use it in GitHub Desktop.
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 main | |
// Note how the main package is the only one importing | |
// other local packages. | |
import ( | |
"github.com/myproject/config" | |
"github.com/myproject/database" | |
"github.com/myproject/handler" | |
"net/http" | |
) | |
func main() { | |
userDB := &database.SomeUserDB{} | |
configDB := &database.SomeConfigDB{} | |
permissionStorage := config.NewPermissionStorage(configDB) | |
h := &handler.UserPermissionsByID{UserDB: userDB, PermissionsStorage: permissionStorage} | |
http.Handle("/", h) | |
http.ListenAndServe(":8080", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment