Skip to content

Commit 93f22a1

Browse files
committed
make linter happy
1 parent d348b9f commit 93f22a1

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

client.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func makeURL(path ...string) string {
5353
return strings.Join(path, urlSeparator)
5454
}
5555

56-
// Compares the provided version against the current version of the Keycloak server.
56+
// compareVersions compares the provided version against the current version of the Keycloak server.
5757
// Current version is fetched from the serverinfo if not already set.
5858
//
5959
// Returns:
@@ -63,15 +63,15 @@ func makeURL(path ...string) string {
6363
// 0 if the provided version is equal to the server version
6464
//
6565
// 1 if the provided version is higher than the server version
66-
func (g *GoCloak) compareVersions(v, token string, ctx context.Context) (int, error) {
66+
func (g *GoCloak) compareVersions(ctx context.Context, v, token string) (int, error) {
6767
curVersion := g.Config.version
6868
if curVersion == "" {
6969
curV, err := g.getServerVersion(ctx, token)
7070
if err != nil {
7171
return 0, err
7272
}
7373

74-
curVersion = curV
74+
curVersion = curV //nolint
7575
}
7676

7777
curVersion = "v" + g.Config.version
@@ -3590,7 +3590,7 @@ func (g *GoCloak) GetPolicies(ctx context.Context, token, realm, idOfClient stri
35903590
return nil, errors.Wrap(err, errMessage)
35913591
}
35923592

3593-
compResult, err := g.compareVersions("20.0.0", token, ctx)
3593+
compResult, err := g.compareVersions(ctx, "20.0.0", token)
35943594
if err != nil {
35953595
return nil, err
35963596
}
@@ -3622,7 +3622,7 @@ func (g *GoCloak) CreatePolicy(ctx context.Context, token, realm, idOfClient str
36223622
return nil, errors.New("type of a policy required")
36233623
}
36243624

3625-
compResult, err := g.compareVersions("20.0.0", token, ctx)
3625+
compResult, err := g.compareVersions(ctx, "20.0.0", token)
36263626
if err != nil {
36273627
return nil, err
36283628
}
@@ -3655,7 +3655,7 @@ func (g *GoCloak) UpdatePolicy(ctx context.Context, token, realm, idOfClient str
36553655
return errors.New("ID of a policy required")
36563656
}
36573657

3658-
compResult, err := g.compareVersions("20.0.0", token, ctx)
3658+
compResult, err := g.compareVersions(ctx, "20.0.0", token)
36593659
if err != nil {
36603660
return err
36613661
}

models.go

+1
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,7 @@ type RequiredActionProviderRepresentation struct {
14261426
ProviderID *string `json:"providerId,omitempty"`
14271427
}
14281428

1429+
// UnregisteredRequiredActionProviderRepresentation is a representation of unregistered required actions.
14291430
type UnregisteredRequiredActionProviderRepresentation struct {
14301431
Name *string `json:"name,omitempty"`
14311432
ProviderID *string `json:"providerId,omitempty"`

0 commit comments

Comments
 (0)