refactor: use ARL initialism casing
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
ArlCookie string
|
ARLCookie string
|
||||||
OutputDir string
|
OutputDir string
|
||||||
HomeDir string
|
HomeDir string
|
||||||
}
|
}
|
||||||
@@ -47,7 +47,7 @@ func New() (*Config, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return &Config{
|
return &Config{
|
||||||
ArlCookie: arl,
|
ARLCookie: arl,
|
||||||
OutputDir: outputDir,
|
OutputDir: outputDir,
|
||||||
HomeDir: homeDir,
|
HomeDir: homeDir,
|
||||||
}, nil
|
}, nil
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ func NewClient(ctx context.Context, appConfig *config.Config) (*Client, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func resolveSession(ctx context.Context, appConfig *config.Config) (*Session, error) {
|
func resolveSession(ctx context.Context, appConfig *config.Config) (*Session, error) {
|
||||||
if appConfig.ArlCookie != "" {
|
if appConfig.ARLCookie != "" {
|
||||||
return Authenticate(ctx, appConfig.ArlCookie)
|
return Authenticate(ctx, appConfig.ARLCookie)
|
||||||
}
|
}
|
||||||
|
|
||||||
var session *Session
|
var session *Session
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ func Authenticate(ctx context.Context, arlCookie string) (*Session, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if res.Results.User.ID == 0 {
|
if res.Results.User.ID == 0 {
|
||||||
return nil, fmt.Errorf("invalid or expired arl cookie")
|
return nil, fmt.Errorf("invalid or expired ARL cookie")
|
||||||
}
|
}
|
||||||
|
|
||||||
opts := res.Results.User.Options
|
opts := res.Results.User.Options
|
||||||
|
|||||||
Reference in New Issue
Block a user