Skip to content

Commit

Permalink
Rename the interface to use the I naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Spurrier committed Apr 16, 2017
1 parent 1e9a039 commit 0f3c076
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
db.json
*.exe
*.exe
cmd/webapp/webapp
8 changes: 4 additions & 4 deletions domain/user_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ type IUserService interface {

// UserService implements the service for users.
type UserService struct {
repo UserRepo // Storage.
repo IUserRepo // Storage.
hash IPasshash // Password hashing.
}

// UserRepo represents the service for storage of users.
type UserRepo interface {
// IUserRepo represents the service for storage of users.
type IUserRepo interface {
ByEmail(email string) (*User, error)
Store(item *User) error
}

// NewUserService returns the service for managing users.
func NewUserService(repo UserRepo, hash IPasshash) *UserService {
func NewUserService(repo IUserRepo, hash IPasshash) *UserService {
s := new(UserService)
s.repo = repo
s.hash = hash
Expand Down

0 comments on commit 0f3c076

Please sign in to comment.