minor code style changes

This commit is contained in:
dhax 2017-09-27 17:42:14 +02:00
parent 4c4041a981
commit 232463e1db
11 changed files with 82 additions and 74 deletions

View file

@ -1,13 +0,0 @@
package mock
import "github.com/dhax/go-base/email"
type EmailService struct {
LoginTokenFn func(name, email string, c email.LoginTokenContent) error
LoginTokenInvoked bool
}
func (s *EmailService) LoginToken(n, e string, c email.LoginTokenContent) error {
s.LoginTokenInvoked = true
return s.LoginTokenFn(n, e, c)
}

13
testing/mock/mailer.go Normal file
View file

@ -0,0 +1,13 @@
package mock
import "github.com/dhax/go-base/email"
type Mailer struct {
LoginTokenFn func(name, email string, c email.ContentLoginToken) error
LoginTokenInvoked bool
}
func (s *Mailer) LoginToken(n, e string, c email.ContentLoginToken) error {
s.LoginTokenInvoked = true
return s.LoginTokenFn(n, e, c)
}