Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linter errors #499

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down