Skip to content

Commit 6506bb2

Browse files
committed
Fix lint issues and regenerate CLI docs
- Fix gci formatting in handler.go (align struct fields) - Rename unused 'flow' parameter to '_' in test functions (revive) - Regenerate CLI docs for new --remote-auth-scope-param-name flag Signed-off-by: Gustavo Gomez <gmogmz@indeed.com>
1 parent 7cb61c5 commit 6506bb2

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

docs/cli/thv_proxy.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/cli/thv_run.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/auth/oauth/flow_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func TestBuildAuthURL(t *testing.T) {
264264
Scopes: []string{"search:read", "chat:write"},
265265
ScopeParamName: "user_scope",
266266
},
267-
validate: func(t *testing.T, authURL string, flow *Flow) {
267+
validate: func(t *testing.T, authURL string, _ *Flow) {
268268
t.Helper()
269269
parsedURL, err := url.Parse(authURL)
270270
require.NoError(t, err)
@@ -286,7 +286,7 @@ func TestBuildAuthURL(t *testing.T) {
286286
Scopes: []string{},
287287
ScopeParamName: "user_scope",
288288
},
289-
validate: func(t *testing.T, authURL string, flow *Flow) {
289+
validate: func(t *testing.T, authURL string, _ *Flow) {
290290
t.Helper()
291291
parsedURL, err := url.Parse(authURL)
292292
require.NoError(t, err)

pkg/auth/remote/handler.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,15 @@ func (h *Handler) performOAuthFlow(
146146
// buildOAuthFlowConfig creates the OAuth flow configuration
147147
func (h *Handler) buildOAuthFlowConfig(scopes []string, authServerInfo *discovery.AuthServerInfo) *discovery.OAuthFlowConfig {
148148
flowConfig := &discovery.OAuthFlowConfig{
149-
ClientID: h.config.ClientID,
150-
ClientSecret: h.config.ClientSecret,
151-
AuthorizeURL: h.config.AuthorizeURL,
152-
TokenURL: h.config.TokenURL,
153-
Scopes: scopes,
154-
CallbackPort: h.config.CallbackPort,
155-
Timeout: h.config.Timeout,
156-
SkipBrowser: h.config.SkipBrowser,
157-
Resource: h.config.Resource,
149+
ClientID: h.config.ClientID,
150+
ClientSecret: h.config.ClientSecret,
151+
AuthorizeURL: h.config.AuthorizeURL,
152+
TokenURL: h.config.TokenURL,
153+
Scopes: scopes,
154+
CallbackPort: h.config.CallbackPort,
155+
Timeout: h.config.Timeout,
156+
SkipBrowser: h.config.SkipBrowser,
157+
Resource: h.config.Resource,
158158
OAuthParams: h.config.OAuthParams,
159159
ScopeParamName: h.config.ScopeParamName,
160160
}

0 commit comments

Comments
 (0)