summaryrefslogtreecommitdiff
path: root/internal/types
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-18 14:24:19 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-18 14:24:19 +0200
commitbda3d2784986e0a3fe2df78ec881332e81b54b3b (patch)
tree86b36f9bc948a38550696e050e2795faaad53cdb /internal/types
parentb2cd79227d299476b5d7e28cb53434b8e919e15f (diff)
All: Run Gofumpt formatter
Diffstat (limited to 'internal/types')
-rw-r--r--internal/types/error.go10
-rw-r--r--internal/types/server.go21
2 files changed, 14 insertions, 17 deletions
diff --git a/internal/types/error.go b/internal/types/error.go
index e5bd082..4a882e2 100644
--- a/internal/types/error.go
+++ b/internal/types/error.go
@@ -1,8 +1,8 @@
package types
import (
- "errors"
"encoding/json"
+ "errors"
"fmt"
)
@@ -83,12 +83,11 @@ func GetErrorLevel(err error) ErrorLevel {
}
type WrappedErrorMessageJSON struct {
- Level ErrorLevel `json:"level"`
- Cause string `json:"cause"`
- Traceback string `json:"traceback"`
+ Level ErrorLevel `json:"level"`
+ Cause string `json:"cause"`
+ Traceback string `json:"traceback"`
}
-
func GetErrorJSONString(err error) string {
var wrappedErr *WrappedErrorMessage
@@ -106,7 +105,6 @@ func GetErrorJSONString(err error) string {
traceback = err.Error()
}
-
json, jsonErr := json.Marshal(&WrappedErrorMessageJSON{Level: level, Cause: cause.Error(), Traceback: traceback})
if jsonErr != nil {
diff --git a/internal/types/server.go b/internal/types/server.go
index 09bfc92..9e68a5c 100644
--- a/internal/types/server.go
+++ b/internal/types/server.go
@@ -16,9 +16,9 @@ type DiscoveryOrganizations struct {
}
type DiscoveryOrganization struct {
- DisplayName map[string]string `json:"display_name"`
- OrgId string `json:"org_id"`
- SecureInternetHome string `json:"secure_internet_home"`
+ DisplayName map[string]string `json:"display_name"`
+ OrgId string `json:"org_id"`
+ SecureInternetHome string `json:"secure_internet_home"`
KeywordList struct {
En string `json:"en"`
} `json:"keyword_list"`
@@ -58,13 +58,12 @@ func (DN *DNMapOrString) UnmarshalJSON(data []byte) error {
return err
}
-
type DiscoveryServer struct {
- AuthenticationURLTemplate string `json:"authentication_url_template"`
- BaseURL string `json:"base_url"`
- CountryCode string `json:"country_code"`
- DisplayName DNMapOrString `json:"display_name,omitempty"`
- PublicKeyList []string `json:"public_key_list"`
- Type string `json:"server_type"`
- SupportContact []string `json:"support_contact"`
+ AuthenticationURLTemplate string `json:"authentication_url_template"`
+ BaseURL string `json:"base_url"`
+ CountryCode string `json:"country_code"`
+ DisplayName DNMapOrString `json:"display_name,omitempty"`
+ PublicKeyList []string `json:"public_key_list"`
+ Type string `json:"server_type"`
+ SupportContact []string `json:"support_contact"`
}