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,