From 37165658e17cc84be0366bf8176b5b7bace77207 Mon Sep 17 00:00:00 2001 From: diamondburned Date: Tue, 27 Oct 2020 14:39:27 -0700 Subject: [PATCH] changed auth ctors to return concrete types --- internal/discord/authenticate/discordlogin.go | 2 +- internal/discord/authenticate/login.go | 2 +- internal/discord/authenticate/token.go | 2 +- internal/discord/authenticate/totp.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/discord/authenticate/discordlogin.go b/internal/discord/authenticate/discordlogin.go index 4e7c32a..942972a 100644 --- a/internal/discord/authenticate/discordlogin.go +++ b/internal/discord/authenticate/discordlogin.go @@ -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{} } diff --git a/internal/discord/authenticate/login.go b/internal/discord/authenticate/login.go index eb886cd..e4220eb 100644 --- a/internal/discord/authenticate/login.go +++ b/internal/discord/authenticate/login.go @@ -15,7 +15,7 @@ type LoginAuthenticator struct { client *api.Client } -func NewLoginAuthenticator() cchat.Authenticator { +func NewLoginAuthenticator() *LoginAuthenticator { return &LoginAuthenticator{ client: api.NewClient(""), } diff --git a/internal/discord/authenticate/token.go b/internal/discord/authenticate/token.go index 89e9dc2..095e42a 100644 --- a/internal/discord/authenticate/token.go +++ b/internal/discord/authenticate/token.go @@ -12,7 +12,7 @@ import ( // authenticate directly using a token. type TokenAuthenticator struct{} -func NewTokenAuthenticator() cchat.Authenticator { +func NewTokenAuthenticator() TokenAuthenticator { return TokenAuthenticator{} } diff --git a/internal/discord/authenticate/totp.go b/internal/discord/authenticate/totp.go index f732966..614088a 100644 --- a/internal/discord/authenticate/totp.go +++ b/internal/discord/authenticate/totp.go @@ -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,