minor code style changes
This commit is contained in:
parent
4c4041a981
commit
232463e1db
11 changed files with 82 additions and 74 deletions
|
|
@ -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
13
testing/mock/mailer.go
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue