From a4dd3b310d68f5c6147bdeaf8ecd3556c2cf7859 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 17 Feb 2020 19:02:26 +0100 Subject: Go fmt --- mxlib/api.go | 45 ++++++++++++++++++++++----------------------- mxlib/registration.go | 20 ++++++++++---------- 2 files changed, 32 insertions(+), 33 deletions(-) (limited to 'mxlib') diff --git a/mxlib/api.go b/mxlib/api.go index de5b424..c7061b3 100644 --- a/mxlib/api.go +++ b/mxlib/api.go @@ -6,7 +6,7 @@ import ( type MxError struct { ErrCode string `json:"errcode"` - ErrMsg string `json:"error"` + ErrMsg string `json:"error"` } func (e *MxError) Error() string { @@ -18,12 +18,12 @@ type Transaction struct { } type Event struct { - Content map[string]interface{} `json:"content"` - Type string `json:"type"` - EventId string `json:"event_id"` - RoomId string `json:"room_id"` - Sender string `json:"sender"` - OriginServerTs int `json:"origin_server_ts"` + Content map[string]interface{} `json:"content"` + Type string `json:"type"` + EventId string `json:"event_id"` + RoomId string `json:"room_id"` + Sender string `json:"sender"` + OriginServerTs int `json:"origin_server_ts"` } type RegisterRequest struct { @@ -31,9 +31,9 @@ type RegisterRequest struct { } type RegisterResponse struct { - UserId string `json:"user_id"` + UserId string `json:"user_id"` AccessToken string `json:"access_token"` - DeviceId string `json:"device_id"` + DeviceId string `json:"device_id"` } type ProfileDisplaynameRequest struct { @@ -41,23 +41,23 @@ type ProfileDisplaynameRequest struct { } type CreateRoomRequest struct { - Preset string `json:"preset"` - RoomAliasName string `json:"room_alias_name"` - Name string `json:"name"` - Topic string `json:"topic"` - Invite []string `json:"invite"` + Preset string `json:"preset"` + RoomAliasName string `json:"room_alias_name"` + Name string `json:"name"` + Topic string `json:"topic"` + Invite []string `json:"invite"` CreationContent map[string]interface{} `json:"creation_content"` - PowerLevels map[string]interface{} `json:"power_level_content_override"` + PowerLevels map[string]interface{} `json:"power_level_content_override"` } type CreateRoomNoAliasRequest struct { - Preset string `json:"preset"` - Name string `json:"name"` - Topic string `json:"topic"` - Invite []string `json:"invite"` + Preset string `json:"preset"` + Name string `json:"name"` + Topic string `json:"topic"` + Invite []string `json:"invite"` CreationContent map[string]interface{} `json:"creation_content"` - PowerLevels map[string]interface{} `json:"power_level_content_override"` - IsDirect bool `json:"is_direct"` + PowerLevels map[string]interface{} `json:"power_level_content_override"` + IsDirect bool `json:"is_direct"` } type CreateRoomResponse struct { @@ -65,7 +65,7 @@ type CreateRoomResponse struct { } type DirectoryRoomResponse struct { - RoomId string `json:"room_id"` + RoomId string `json:"room_id"` Servers []string `json:"string"` } @@ -84,4 +84,3 @@ type RoomJoinResponse struct { type RoomSendResponse struct { EventId string `json:"event_id"` } - diff --git a/mxlib/registration.go b/mxlib/registration.go index d4b18dc..cae3f29 100644 --- a/mxlib/registration.go +++ b/mxlib/registration.go @@ -5,21 +5,21 @@ import ( ) type Registration struct { - Id string `yaml:"id"` - Url string `yaml:"url"` - AsToken string `yaml:"as_token"` - HsToken string `yaml:"hs_token"` - SenderLocalpart string `yaml:"sender_localpart"` - Namespaces RegistrationNamespaceSet `yaml:"namespaces"` + Id string `yaml:"id"` + Url string `yaml:"url"` + AsToken string `yaml:"as_token"` + HsToken string `yaml:"hs_token"` + SenderLocalpart string `yaml:"sender_localpart"` + Namespaces RegistrationNamespaceSet `yaml:"namespaces"` } type RegistrationNamespaceSet struct { - Users []RegistrationNamespace `yaml:"users"` + Users []RegistrationNamespace `yaml:"users"` Aliases []RegistrationNamespace `yaml:"aliases"` - Rooms []RegistrationNamespace `yaml:"rooms"` + Rooms []RegistrationNamespace `yaml:"rooms"` } type RegistrationNamespace struct { - Exclusive bool `yaml:"exclusive"` - Regex string `yaml:"regex"` + Exclusive bool `yaml:"exclusive"` + Regex string `yaml:"regex"` } -- cgit v1.2.3