Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-brenton committed Nov 25, 2024
1 parent 6ee67a5 commit 0ad702b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions internal/acctest/http_recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func redactDomain(i *cassette.Interaction, domain string) {

func redactSensitiveDataInClient(t *testing.T, i *cassette.Interaction, domain string) {
baseURL := "https://" + domain + "/api/v2/clients"
urlPath := strings.Split(i.Request.URL, "?")[0] // Strip query params
urlPath := strings.Split(i.Request.URL, "?")[0] // Strip query params.

create := i.Request.URL == baseURL &&
i.Request.Method == http.MethodPost
Expand All @@ -132,7 +132,7 @@ func redactSensitiveDataInClient(t *testing.T, i *cassette.Interaction, domain s

redacted := "[REDACTED]"

// Handle list response
// Handle list response.
if readList {
var response management.ClientList
err := json.Unmarshal([]byte(i.Response.Body), &response)
Expand All @@ -153,7 +153,7 @@ func redactSensitiveDataInClient(t *testing.T, i *cassette.Interaction, domain s
return
}

// Handle single client response
// Handle single client response.
var client management.Client
err := json.Unmarshal([]byte(i.Response.Body), &client)
require.NoError(t, err)
Expand Down
1 change: 1 addition & 0 deletions internal/auth0/client/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
internalValidation "github.com/auth0/terraform-provider-auth0/internal/validation"
)

// ValidAppTypes contains all valid values for client app_type.
var ValidAppTypes = []string{
"native", "spa", "regular_web", "non_interactive", "rms",
"box", "cloudbees", "concur", "dropbox", "mscrm", "echosign",
Expand Down
10 changes: 5 additions & 5 deletions internal/auth0/clients/data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ func NewDataSource() *schema.Resource {
Computed: true,
Description: "List of clients matching the filter criteria.",
Elem: &schema.Resource{
Schema: CoreClientDataSourceSchema(),
Schema: coreClientDataSourceSchema(),
},
},
},
}
}

func CoreClientDataSourceSchema() map[string]*schema.Schema {
func coreClientDataSourceSchema() map[string]*schema.Schema {
clientSchema := client.NewDataSource().Schema

// Remove unused fields from the client schema
// Remove unused fields from the client schema.
fieldsToRemove := []string{
"client_aliases",
"logo_uri",
Expand Down Expand Up @@ -121,7 +121,7 @@ func readClientsForDataSource(ctx context.Context, data *schema.ResourceData, me

var page int
for {
// Add current page parameter
// Add current page parameter.
params = append(params, management.Page(page))

list, err := api.Client.List(ctx, params...)
Expand All @@ -139,7 +139,7 @@ func readClientsForDataSource(ctx context.Context, data *schema.ResourceData, me
break
}

// Remove the page parameter and increment for next iteration
// Remove the page parameter and increment for next iteration.
params = params[:len(params)-1]
page++
}
Expand Down

0 comments on commit 0ad702b

Please sign in to comment.