1
0
Fork 0
mirror of https://github.com/diamondburned/cchat-discord.git synced 2024-11-22 06:02:59 +00:00

changed auth ctors to return concrete types

This commit is contained in:
diamondburned 2020-10-27 14:39:27 -07:00
parent 31c378db5a
commit 37165658e1
4 changed files with 4 additions and 4 deletions

View file

@ -20,7 +20,7 @@ var ErrDLNotFound = errors.New("DiscordLogin not found. Please install it from t
// application if possible. If not, it'll try and exec up a browser.
type DiscordLoginAuth struct{}
func NewDiscordLogin() cchat.Authenticator {
func NewDiscordLogin() DiscordLoginAuth {
return DiscordLoginAuth{}
}

View file

@ -15,7 +15,7 @@ type LoginAuthenticator struct {
client *api.Client
}
func NewLoginAuthenticator() cchat.Authenticator {
func NewLoginAuthenticator() *LoginAuthenticator {
return &LoginAuthenticator{
client: api.NewClient(""),
}

View file

@ -12,7 +12,7 @@ import (
// authenticate directly using a token.
type TokenAuthenticator struct{}
func NewTokenAuthenticator() cchat.Authenticator {
func NewTokenAuthenticator() TokenAuthenticator {
return TokenAuthenticator{}
}

View file

@ -32,7 +32,7 @@ type TOTPAuthenticator struct {
ticket string
}
func NewTOTPAuthenticator(ticket string) cchat.Authenticator {
func NewTOTPAuthenticator(ticket string) *TOTPAuthenticator {
return &TOTPAuthenticator{
client: api.NewClient(""),
ticket: ticket,