From 9ebcebee431117e2be0b7f13d2872e9bf449ffb8 Mon Sep 17 00:00:00 2001 From: Roman Isaev Date: Mon, 30 Dec 2024 17:12:22 +0000 Subject: [PATCH] another goimports fix --- setup/mscs/msc3861/msc3861_user_verifier.go | 7 ++----- userapi/storage/shared/storage.go | 2 +- userapi/types/storage.go | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/setup/mscs/msc3861/msc3861_user_verifier.go b/setup/mscs/msc3861/msc3861_user_verifier.go index dab71d45..597b844e 100644 --- a/setup/mscs/msc3861/msc3861_user_verifier.go +++ b/setup/mscs/msc3861/msc3861_user_verifier.go @@ -322,8 +322,6 @@ func (m *MSC3861UserVerifier) getUserByAccessToken(ctx context.Context, token st logger.Debugf("PerformDeviceCreationResponse is: %+v", rs) } - - return &requester{ Device: device, UserID: userID, @@ -358,7 +356,7 @@ func (m *MSC3861UserVerifier) introspectToken(ctx context.Context, token string) defer resp.Body.Close() if c := resp.StatusCode; c < 200 || c >= 300 { - return nil, errors.New(strings.Join([]string{"The introspection endpoint returned a '", resp.Status ,"' response"}, "")) + return nil, errors.New(strings.Join([]string{"The introspection endpoint returned a '", resp.Status, "' response"}, "")) } var ir introspectionResponse if err := json.NewDecoder(body).Decode(&ir); err != nil { @@ -402,8 +400,7 @@ type OpenIDConfiguration struct { AccountManagementActionsSupported []string `json:"account_management_actions_supported"` } -func fetchOpenIDConfiguration(httpClient *http.Client, authHostURL string) (* - OpenIDConfiguration, error) { +func fetchOpenIDConfiguration(httpClient *http.Client, authHostURL string) (*OpenIDConfiguration, error) { u, err := url.Parse(authHostURL) if err != nil { return nil, err diff --git a/userapi/storage/shared/storage.go b/userapi/storage/shared/storage.go index 2feca052..e76cde61 100644 --- a/userapi/storage/shared/storage.go +++ b/userapi/storage/shared/storage.go @@ -1163,7 +1163,7 @@ func (d *KeyDatabase) StoreCrossSigningKeysForUser(ctx context.Context, userID s // Normally this attribute depending on its value marks the master key as replaceable without UIA. func (d *KeyDatabase) UpdateMasterCrossSigningKeyAllowReplacementWithoutUIA(ctx context.Context, userID string, duration time.Duration) (int64, error) { var ts int64 - err := d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error { + err := d.Writer.Do(d.DB, nil, func(txn *sql.Tx) error { var err error ts, err = d.CrossSigningKeysTable.UpdateMasterCrossSigningKeyAllowReplacementWithoutUIA(ctx, txn, userID, duration) return err diff --git a/userapi/types/storage.go b/userapi/types/storage.go index 260e2a25..3e58c8e6 100644 --- a/userapi/types/storage.go +++ b/userapi/types/storage.go @@ -39,7 +39,7 @@ var KeyTypeIntToPurpose = map[int16]fclient.CrossSigningKeyPurpose{ type CrossSigningKey struct { UpdatableWithoutUIABeforeMs *int64 - KeyData spec.Base64Bytes + KeyData spec.Base64Bytes } // Map of purpose -> public key