diff --git a/transports/Replicant/v3/config.go b/transports/Replicant/v3/config.go index 37426ce..3227cb5 100644 --- a/transports/Replicant/v3/config.go +++ b/transports/Replicant/v3/config.go @@ -41,16 +41,20 @@ type ServerConfig struct { Polish polish.ServerConfig } -func (config ServerConfig) Marshal() (string, error) { +type ClientJSONConfig struct { + Config string `json:"config"` + Address string `json:"address"` +} - type ServerJSONInnerConfig struct { - Config string `json:"config"` - } +type ServerJSONInnerConfig struct { + Config string `json:"config"` +} - type ServerJSONOuterConfig struct { - Replicant ServerJSONInnerConfig - } +type ServerJSONOuterConfig struct { + Replicant ServerJSONInnerConfig +} +func (config ServerConfig) Marshal() (string, error) { configString, configStringError := config.Encode() if configStringError != nil { return "", configStringError @@ -69,11 +73,6 @@ func (config ServerConfig) Marshal() (string, error) { func (config ClientConfig) Marshal() (string, error) { - type ClientJSONConfig struct { - Config string `json:"config"` - Address string `json:"address"` - } - configString, configStringError := config.Encode() if configStringError != nil { return "", configStringError