summaryrefslogtreecommitdiff
path: root/types
diff options
context:
space:
mode:
Diffstat (limited to 'types')
-rw-r--r--types/server.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/types/server.go b/types/server.go
index c15cb4e..5cd7353 100644
--- a/types/server.go
+++ b/types/server.go
@@ -34,13 +34,13 @@ type DiscoMapOrString map[string]string
// The display name can either be a map or a string in the server list
// Unmarshal it by first trying a string and then the map.
-func (DN *DiscoMapOrString) UnmarshalJSON(data []byte) error {
+func (displayName *DiscoMapOrString) UnmarshalJSON(data []byte) error {
var displayNameString string
err := json.Unmarshal(data, &displayNameString)
if err == nil {
- *DN = map[string]string{"en": displayNameString}
+ *displayName = map[string]string{"en": displayNameString}
return nil
}
@@ -49,7 +49,7 @@ func (DN *DiscoMapOrString) UnmarshalJSON(data []byte) error {
err = json.Unmarshal(data, &resultingMap)
if err == nil {
- *DN = resultingMap
+ *displayName = resultingMap
return nil
}
return err