Skip to content

Commit e5aa60d

Browse files
committed
Merge branch 'main' into dependabot/go_modules/github.com/auth0/go-auth0/v2-2.13.0
2 parents e0696a4 + e67d23e commit e5aa60d

22 files changed

Lines changed: 290 additions & 163 deletions

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
run: make check-docs
3232

3333
- name: Check for linting errors
34-
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
34+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # 9.2.0
3535
with:
3636
install-mode: "goinstall"
37-
version: v1.64.6
37+
version: latest
3838
args: -v -c .golangci.yml
3939

4040
unit-tests:

.golangci.bck.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
run:
2+
timeout: 5m
3+
allow-parallel-runners: true
4+
5+
linters:
6+
disable-all: true
7+
enable:
8+
- unused
9+
- gofmt
10+
- staticcheck
11+
- revive
12+
- godot
13+
- whitespace
14+
- goimports
15+
- gosimple
16+
- errcheck
17+
- unconvert
18+
- gocritic
19+
# - gosec
20+
# - gocyclo
21+
22+
linters-settings:
23+
gofmt:
24+
simplify: true
25+
staticcheck:
26+
checks: [ "all" ]
27+
godot:
28+
scope: all
29+
capital: true
30+
period: true
31+
goimports:
32+
local-prefixes: "github.com/auth0/auth0-cli"
33+
34+
issues:
35+
exclude-use-default: false
36+
# We are excluding a couple of them,
37+
# so we can fix them one at a time
38+
# as the effort is non-trivial.
39+
exclude:
40+
- "should have a package comment"
41+
- "package comment should be of the form"
42+
- "should have comment"
43+
- "be unexported"
44+
- "blank-imports"
45+
- "unused-parameter"
46+
- "Error return value of (.+) is not checked"

.golangci.yml

Lines changed: 52 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,59 @@
1+
version: "2"
12
run:
2-
timeout: 5m
33
allow-parallel-runners: true
4-
54
linters:
6-
disable-all: true
5+
default: none
76
enable:
8-
- unused
9-
- gofmt
10-
- staticcheck
11-
- revive
7+
- errcheck
8+
- gocritic
129
- godot
10+
- revive
11+
- staticcheck
12+
- unconvert
13+
- unused
1314
- whitespace
15+
settings:
16+
godot:
17+
scope: all
18+
capital: true
19+
period: true
20+
staticcheck:
21+
checks:
22+
- all
23+
exclusions:
24+
generated: lax
25+
rules:
26+
- path: (.+)\.go$
27+
text: should have a package comment
28+
- path: (.+)\.go$
29+
text: package comment should be of the form
30+
- path: (.+)\.go$
31+
text: should have comment
32+
- path: (.+)\.go$
33+
text: be unexported
34+
- path: (.+)\.go$
35+
text: blank-imports
36+
- path: (.+)\.go$
37+
text: unused-parameter
38+
- path: (.+)\.go$
39+
text: Error return value of (.+) is not checked
40+
paths:
41+
- third_party$
42+
- builtin$
43+
- examples$
44+
formatters:
45+
enable:
46+
- gofmt
1447
- goimports
15-
- gosimple
16-
- errcheck
17-
- unconvert
18-
- gocritic
19-
# - gosec
20-
# - gocyclo
21-
22-
linters-settings:
23-
gofmt:
24-
simplify: true
25-
staticcheck:
26-
checks: [ "all" ]
27-
godot:
28-
scope: all
29-
capital: true
30-
period: true
31-
goimports:
32-
local-prefixes: "github.com/auth0/auth0-cli"
33-
34-
issues:
35-
exclude-use-default: false
36-
# We are excluding a couple of them,
37-
# so we can fix them one at a time
38-
# as the effort is non-trivial.
39-
exclude:
40-
- "should have a package comment"
41-
- "package comment should be of the form"
42-
- "should have comment"
43-
- "be unexported"
44-
- "blank-imports"
45-
- "unused-parameter"
46-
- "Error return value of (.+) is not checked"
48+
settings:
49+
gofmt:
50+
simplify: true
51+
goimports:
52+
local-prefixes:
53+
- github.com/auth0/auth0-cli
54+
exclusions:
55+
generated: lax
56+
paths:
57+
- third_party$
58+
- builtin$
59+
- examples$

docs/Gemfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ GEM
2424
coffee-script-source (1.12.2)
2525
colorator (1.1.0)
2626
commonmarker (0.23.10)
27-
concurrent-ruby (1.3.6)
27+
concurrent-ruby (1.3.7)
2828
connection_pool (3.0.2)
2929
csv (3.3.0)
3030
dnsruby (1.72.2)
@@ -37,11 +37,11 @@ GEM
3737
ffi (>= 1.15.0)
3838
eventmachine (1.2.7)
3939
execjs (2.9.1)
40-
faraday (2.14.2)
40+
faraday (2.14.3)
4141
faraday-net_http (>= 2.0, < 3.5)
4242
json
4343
logger
44-
faraday-net_http (3.4.2)
44+
faraday-net_http (3.4.4)
4545
net-http (~> 0.5)
4646
ffi (1.17.0)
4747
ffi (1.17.0-x86_64-darwin)
@@ -216,7 +216,7 @@ GEM
216216
gemoji (>= 3, < 5)
217217
html-pipeline (~> 2.2)
218218
jekyll (>= 3.0, < 5.0)
219-
json (2.19.5)
219+
json (2.19.9)
220220
kramdown (2.4.0)
221221
rexml
222222
kramdown-parser-gfm (1.1.0)
@@ -235,12 +235,12 @@ GEM
235235
minitest (5.27.0)
236236
net-http (0.9.1)
237237
uri (>= 0.11.1)
238-
nokogiri (1.19.3)
238+
nokogiri (1.19.4)
239239
mini_portile2 (~> 2.8.2)
240240
racc (~> 1.4)
241-
nokogiri (1.19.3-x86_64-darwin)
241+
nokogiri (1.19.4-x86_64-darwin)
242242
racc (~> 1.4)
243-
nokogiri (1.19.3-x86_64-linux-gnu)
243+
nokogiri (1.19.4-x86_64-linux-gnu)
244244
racc (~> 1.4)
245245
octokit (4.25.1)
246246
faraday (>= 1, < 3)

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ require (
66
github.com/AlecAivazis/survey/v2 v2.3.7
77
github.com/PuerkitoBio/rehttp v1.4.0
88
github.com/atotto/clipboard v0.1.4
9-
github.com/auth0/go-auth0 v1.42.1
9+
github.com/auth0/go-auth0 v1.43.0
1010
github.com/auth0/go-auth0/v2 v2.13.0
1111
github.com/briandowns/spinner v1.23.2
1212
github.com/charmbracelet/glamour v1.0.0
1313
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
1414
github.com/fsnotify/fsnotify v1.10.1
15-
github.com/getsentry/sentry-go v0.46.2
15+
github.com/getsentry/sentry-go v0.47.0
1616
github.com/golang/mock v1.6.0
1717
github.com/google/go-cmp v0.7.0
1818
github.com/google/uuid v1.6.0
@@ -30,7 +30,7 @@ require (
3030
github.com/olekukonko/tablewriter v0.0.5
3131
github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2
3232
github.com/pkg/errors v0.9.1
33-
github.com/pmezard/go-difflib v1.0.0
33+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
3434
github.com/schollz/progressbar/v3 v3.19.0
3535
github.com/spf13/cobra v1.10.2
3636
github.com/spf13/pflag v1.0.10
@@ -59,7 +59,7 @@ require (
5959
github.com/charmbracelet/x/term v0.2.1 // indirect
6060
github.com/cloudflare/circl v1.6.3 // indirect
6161
github.com/danieljoos/wincred v1.2.3 // indirect
62-
github.com/davecgh/go-spew v1.1.1 // indirect
62+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
6363
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1 // indirect
6464
github.com/dlclark/regexp2 v1.11.5 // indirect
6565
github.com/fatih/color v1.16.0 // indirect

go.sum

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew
2020
github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4=
2121
github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=
2222
github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=
23-
github.com/auth0/go-auth0 v1.42.1 h1:R51Py1sSAvjWaiRrNTHj12MEdWw6eZHEQJyuIMg2o28=
24-
github.com/auth0/go-auth0 v1.42.1/go.mod h1:32sQB1uAn+99fJo6N819EniKq8h785p0ag0lMWhiTaE=
23+
github.com/auth0/go-auth0 v1.43.0 h1:sbtJHqukY1esWqlvyRpwIZ/If1m4h8e24TW2UztMXtA=
24+
github.com/auth0/go-auth0 v1.43.0/go.mod h1:32sQB1uAn+99fJo6N819EniKq8h785p0ag0lMWhiTaE=
2525
github.com/auth0/go-auth0/v2 v2.13.0 h1:Lf1cPRypkb879mHin1GlGS6NtWkO47Efo0Bq2HIMez4=
2626
github.com/auth0/go-auth0/v2 v2.13.0/go.mod h1:Q/Y3VZVoI3sw87VyTPhx2TQL6Sq4Q/iCP67rW2gcn+M=
2727
github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48=
@@ -71,8 +71,9 @@ github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGL
7171
github.com/danieljoos/wincred v1.2.3 h1:v7dZC2x32Ut3nEfRH+vhoZGvN72+dQ/snVXo/vMFLdQ=
7272
github.com/danieljoos/wincred v1.2.3/go.mod h1:6qqX0WNrS4RzPZ1tnroDzq9kY3fu1KwE7MRLQK4X0bs=
7373
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
74-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
7574
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
75+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
76+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
7677
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1 h1:5RVFMOWjMyRy8cARdy79nAmgYw3hK/4HUq48LQ6Wwqo=
7778
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.1/go.mod h1:ZXNYxsqcloTdSy/rNShjYzMhyjf0LaoftYK0p+A3h40=
7879
github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ=
@@ -84,8 +85,8 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
8485
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
8586
github.com/fsnotify/fsnotify v1.10.1 h1:b0/UzAf9yR5rhf3RPm9gf3ehBPpf0oZKIjtpKrx59Ho=
8687
github.com/fsnotify/fsnotify v1.10.1/go.mod h1:TLheqan6HD6GBK6PrDWyDPBaEV8LspOxvPSjC+bVfgo=
87-
github.com/getsentry/sentry-go v0.46.2 h1:1jhYwrKGa3sIpo/y5iDNXS5wDoT7I1KNzMHrnK6ojns=
88-
github.com/getsentry/sentry-go v0.46.2/go.mod h1:evVbw2qotNUdYG8KxXbAdjOQWWvWIwKxpjdZZIvcIPw=
88+
github.com/getsentry/sentry-go v0.47.0 h1:AnSMSyrYA5qZCIN/2xpgAAwv63sVULV+vBq37ajouc8=
89+
github.com/getsentry/sentry-go v0.47.0/go.mod h1:h+b4VHpKnK7aUXB5wc+KDnPgp9ZtfliRD4eV85FbiSA=
8990
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
9091
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
9192
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI=
@@ -204,14 +205,15 @@ github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 h1:acNfDZXmm28D2Yg/c3A
204205
github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
205206
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
206207
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
207-
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
208208
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
209+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
210+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
209211
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
210212
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
211213
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
212214
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
213-
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
214-
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
215+
github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ=
216+
github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc=
215217
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
216218
github.com/schollz/progressbar/v3 v3.19.0 h1:Ea18xuIRQXLAUidVDox3AbwfUhD0/1IvohyTutOIFoc=
217219
github.com/schollz/progressbar/v3 v3.19.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec=

internal/auth0/http_client.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,11 @@ type HTTPClientAPI interface {
1515
// Do triggers an HTTP request and returns an HTTP response,
1616
// handling any context cancellations or timeouts.
1717
Do(req *http.Request) (*http.Response, error)
18+
19+
// Request combines NewRequest and Do, encoding the payload as JSON and
20+
// returning an error for any non-2xx response.
21+
Request(ctx context.Context, method, uri string, payload interface{}, options ...management.RequestOption) error
22+
23+
// URI builds a fully-qualified Management API URL from the given path segments.
24+
URI(path ...string) string
1825
}

internal/cli/actions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ func diffActionCmd(cli *cli) *cobra.Command {
591591
}
592592

593593
if code1 == "" || code2 == "" {
594-
return fmt.Errorf("There are %d versions for the action. "+
594+
return fmt.Errorf("there are %d versions for the action. "+
595595
"\nCould not find one of the versions: %d or %d", len(allVersions), inputs.version1, inputs.version2)
596596
}
597597

0 commit comments

Comments
 (0)