diff --git a/api/domain_export.go b/api/domain_export.go index 77f9f72..9aa2708 100644 --- a/api/domain_export.go +++ b/api/domain_export.go @@ -1,8 +1,8 @@ package main import ( - "net/http" "encoding/json" + "net/http" "time" ) @@ -16,8 +16,8 @@ func domainExportBeginError(email string, toName string, domain string, err erro func domainExportBegin(email string, toName string, domain string) { type dataExport struct { - Version int `json:"version"` - Comments []comment `json:"comments"` + Version int `json:"version"` + Comments []comment `json:"comments"` Commenters []commenter `json:"commenters"` } @@ -114,7 +114,7 @@ func domainExportBegin(email string, toName string, domain string) { func domainExportBeginHandler(w http.ResponseWriter, r *http.Request) { type request struct { OwnerToken *string `json:"ownerToken"` - Domain *string `json:"domain"` + Domain *string `json:"domain"` } var x request @@ -145,7 +145,7 @@ func domainExportBeginHandler(w http.ResponseWriter, r *http.Request) { return } - go domainExportBegin(o.Email, o.Name, *x.Domain); + go domainExportBegin(o.Email, o.Name, *x.Domain) bodyMarshal(w, response{"success": true}) } diff --git a/api/domain_export_download.go b/api/domain_export_download.go index a9274ce..f6bebc0 100644 --- a/api/domain_export_download.go +++ b/api/domain_export_download.go @@ -1,8 +1,8 @@ package main import ( - "net/http" "fmt" + "net/http" "time" ) diff --git a/api/oauth_github_callback.go b/api/oauth_github_callback.go index 848ae87..d00e78a 100644 --- a/api/oauth_github_callback.go +++ b/api/oauth_github_callback.go @@ -14,7 +14,7 @@ func githubGetPrimaryEmail(accessToken string) (string, error) { contents, err := ioutil.ReadAll(resp.Body) if err != nil { - return "", errorCannotReadResponse + return "", errorCannotReadResponse } user := []map[string]interface{}{} @@ -24,7 +24,7 @@ func githubGetPrimaryEmail(accessToken string) (string, error) { } nonPrimaryEmail := "" - for _, email := range(user) { + for _, email := range user { nonPrimaryEmail = email["email"].(string) if email["primary"].(bool) { return email["email"].(string), nil diff --git a/api/smtp_domain_export.go b/api/smtp_domain_export.go index 0b47514..e00a9a1 100644 --- a/api/smtp_domain_export.go +++ b/api/smtp_domain_export.go @@ -7,8 +7,8 @@ import ( ) type domainExportPlugs struct { - Origin string - Domain string + Origin string + Domain string ExportHex string } diff --git a/api/smtp_domain_export_error.go b/api/smtp_domain_export_error.go index 50ee137..c3cff87 100644 --- a/api/smtp_domain_export_error.go +++ b/api/smtp_domain_export_error.go @@ -7,7 +7,7 @@ import ( ) type domainExportErrorPlugs struct { - Origin string + Origin string Domain string }