Skip to content

Commit 0c50d93

Browse files
committed
style: Fix request editor params arg name
1 parent 8a55026 commit 0c50d93

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

device/device_flow.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ type CodeResponse struct {
5555
}
5656

5757
// Function signature for setting additional form values.
58-
type AuthRequestFn func(*url.Values)
58+
type AuthRequestEditorFn func(*url.Values)
5959

60-
func WithAudience(audience string) AuthRequestFn {
60+
func WithAudience(audience string) AuthRequestEditorFn {
6161
return func(values *url.Values) {
6262
if audience != "" {
6363
values.Add("audience", audience)
@@ -66,13 +66,14 @@ func WithAudience(audience string) AuthRequestFn {
6666
}
6767

6868
// RequestCode initiates the authorization flow by requesting a code from uri.
69-
func RequestCode(c httpClient, uri string, clientID string, scopes []string, extra ...AuthRequestFn) (*CodeResponse, error) {
69+
func RequestCode(c httpClient, uri string, clientID string, scopes []string,
70+
optionalRequestParams ...AuthRequestEditorFn) (*CodeResponse, error) {
7071
values := url.Values{
7172
"client_id": {clientID},
7273
"scope": {strings.Join(scopes, " ")},
7374
}
7475

75-
for _, fn := range extra {
76+
for _, fn := range optionalRequestParams {
7677
fn(&values)
7778
}
7879

0 commit comments

Comments
 (0)