diff --git a/cmd/hydroxide/hydroxide.go b/cmd/hydroxide/hydroxide.go index 45be460..427268d 100644 --- a/cmd/hydroxide/hydroxide.go +++ b/cmd/hydroxide/hydroxide.go @@ -28,8 +28,8 @@ import ( func newClient() *protonmail.Client { return &protonmail.Client{ - RootURL: "https://mail.protonmail.com/api", - AppVersion: "Web_3.16.6", + RootURL: "https://mail.protonmail.com/api", + AppVersion: "Web_3.16.6", } } @@ -209,10 +209,10 @@ func main() { } err = auth.EncryptAndSave(&auth.CachedAuth{ - Auth: *a, - LoginPassword: loginPassword, + Auth: *a, + LoginPassword: loginPassword, MailboxPassword: mailboxPassword, - KeySalts: keySalts, + KeySalts: keySalts, }, username, secretKey) if err != nil { log.Fatal(err) diff --git a/protonmail/auth.go b/protonmail/auth.go index b59e0c8..0bfba1e 100644 --- a/protonmail/auth.go +++ b/protonmail/auth.go @@ -12,7 +12,7 @@ import ( ) type authInfoReq struct { - Username string + Username string } type AuthInfo struct { @@ -45,7 +45,7 @@ func (resp *AuthInfoResp) authInfo() *AuthInfo { func (c *Client) AuthInfo(username string) (*AuthInfo, error) { reqData := &authInfoReq{ - Username: username, + Username: username, } req, err := c.newJSONRequest(http.MethodPost, "/auth/info", reqData) @@ -84,10 +84,10 @@ type Auth struct { UserID string EventID string PasswordMode PasswordMode - TwoFactor struct { + TwoFactor struct { Enabled int - U2F interface{} // TODO - TOTP int + U2F interface{} // TODO + TOTP int } `json:"2FA"` } @@ -212,7 +212,7 @@ func (c *Client) ListKeySalts() (map[string][]byte, error) { var respData struct { resp KeySalts []struct { - ID string + ID string KeySalt string } }