Skip to content

Instantly share code, notes, and snippets.

@krittawatcode
Last active November 14, 2020 06:11
Show Gist options
  • Save krittawatcode/737a5967c0b060dc124fa005d7a35e4f to your computer and use it in GitHub Desktop.
Save krittawatcode/737a5967c0b060dc124fa005d7a35e4f to your computer and use it in GitHub Desktop.
LoginService.go
package service
type LoginService interface {
LoginUser(email string, password string) bool
}
type loginInformation struct {
email string
password string
}
func StaticLoginService() LoginService {
return &loginInformation{
email: "bikash.dulal@wesionary.team",
password: "testing",
}
}
func (info *loginInformation) LoginUser(email string, password string) bool {
return info.email == email && info.password == password
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment