diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-28 15:04:47 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-11-28 15:04:47 +0100 |
| commit | 3934d75ac516a530ceb9f494f7ce0de12cb1b5de (patch) | |
| tree | 23c905ad43340e3192362afaeec8b6f6731575a8 /types/server.go | |
| parent | f884b3df2762a1bd3799441e06659b9caad4ee6c (diff) | |
Lint: Use gocritic linter and fix errors returned by it
Diffstat (limited to 'types/server.go')
| -rw-r--r-- | types/server.go | 6 |
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 |
