From 352f2bf41594a26622d70819b791292077a574da Mon Sep 17 00:00:00 2001 From: Wilfred Dube Date: Mon, 30 Dec 2024 18:45:00 +0200 Subject: [PATCH] Fix linter errors --- client.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index c06063be..13a6ed35 100644 --- a/client.go +++ b/client.go @@ -63,7 +63,7 @@ func makeURL(path ...string) string { // 0 if the provided version is equal to the server version // // 1 if the provided version is higher than the server version -func (g *GoCloak) compareVersions(v, token string, ctx context.Context) (int, error) { +func (g *GoCloak) compareVersions(ctx context.Context, v, token string) (int, error) { curVersion := g.Config.version if curVersion == "" { curV, err := g.getServerVersion(ctx, token) @@ -3590,7 +3590,7 @@ func (g *GoCloak) GetPolicies(ctx context.Context, token, realm, idOfClient stri return nil, errors.Wrap(err, errMessage) } - compResult, err := g.compareVersions("20.0.0", token, ctx) + compResult, err := g.compareVersions(ctx, "20.0.0", token) if err != nil { return nil, err } @@ -3622,7 +3622,7 @@ func (g *GoCloak) CreatePolicy(ctx context.Context, token, realm, idOfClient str return nil, errors.New("type of a policy required") } - compResult, err := g.compareVersions("20.0.0", token, ctx) + compResult, err := g.compareVersions(ctx, "20.0.0", token) if err != nil { return nil, err } @@ -3655,7 +3655,7 @@ func (g *GoCloak) UpdatePolicy(ctx context.Context, token, realm, idOfClient str return errors.New("ID of a policy required") } - compResult, err := g.compareVersions("20.0.0", token, ctx) + compResult, err := g.compareVersions(ctx, "20.0.0", token) if err != nil { return err }