From 59e6ccd051452162fab852a25deb4f0f8a9e22b2 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 28 Nov 2022 14:09:28 +0100 Subject: Refactor: Fix revive linter errors by deleting redundant prefixes --- internal/oauth/token.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/oauth/token.go') diff --git a/internal/oauth/token.go b/internal/oauth/token.go index 8ceb9a8..eb79357 100644 --- a/internal/oauth/token.go +++ b/internal/oauth/token.go @@ -2,8 +2,8 @@ package oauth import "time" -// OAuthTokenResponse defines the OAuth response from the server that includes the tokens. -type OAuthTokenResponse struct { +// TokenResponse defines the OAuth response from the server that includes the tokens. +type TokenResponse struct { // Access is the access token returned by the server Access string `json:"access_token"` @@ -18,8 +18,8 @@ type OAuthTokenResponse struct { } -// OAuthToken is a structure that contains our access and refresh tokens and a timestamp when they expire. -type OAuthToken struct { +// Token is a structure that contains our access and refresh tokens and a timestamp when they expire. +type Token struct { // Access is the access token returned by the server access string @@ -31,7 +31,7 @@ type OAuthToken struct { } // Expired checks if the access token is expired. -func (tokens *OAuthToken) Expired() bool { +func (tokens *Token) Expired() bool { currentTime := time.Now() return !currentTime.Before(tokens.expiredTimestamp) } -- cgit v1.2.3