go fmt
This commit is contained in:
parent
653a8a0dc0
commit
d964a951a0
|
@ -116,8 +116,6 @@ func (c *Client) Auth(username, password, twoFactorCode string, info *AuthInfo)
|
|||
}
|
||||
}
|
||||
|
||||
log.Printf("%#v\n", info)
|
||||
|
||||
proofs, err := srp([]byte(password), info)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"strconv"
|
||||
)
|
||||
|
||||
const Version = 2
|
||||
const Version = 3
|
||||
|
||||
const headerAPIVersion = "X-Pm-Apiversion"
|
||||
|
||||
|
@ -39,15 +39,17 @@ func (err apiError) Error() string {
|
|||
|
||||
// Client is a ProtonMail API client.
|
||||
type Client struct {
|
||||
HTTPClient *http.Client
|
||||
RootURL string
|
||||
AppVersion string
|
||||
|
||||
ClientID string
|
||||
ClientSecret string
|
||||
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
func (c *Client) newRequest(method, path string, body io.Reader) (*http.Request, error) {
|
||||
req, err := http.NewRequest(method, c.RootURL + path, body)
|
||||
req, err := http.NewRequest(method, c.RootURL+path, body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ func reverse(b []byte) {
|
|||
func itoa(i *big.Int, l int) []byte {
|
||||
b := i.Bytes()
|
||||
reverse(b)
|
||||
padding := make([]byte, l/8 - len(b))
|
||||
padding := make([]byte, l/8-len(b))
|
||||
b = append(b, padding...)
|
||||
return b
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue