Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor enum types #1

Merged
merged 2 commits into from
Apr 21, 2022
Merged

Refactor enum types #1

merged 2 commits into from
Apr 21, 2022

Conversation

DerAndereAndi
Copy link
Member

This way we never would need to cast for these

This way we never would need to cast for these
@DerAndereAndi
Copy link
Member Author

@taimo42 was denkst du hierzu?

@taimo42
Copy link
Collaborator

taimo42 commented Apr 20, 2022

Top!
Auf jeden Fall eine Vereinfachung.
Können wir noch die doppelten 'Type' entfernen? Also z.B. statt DeviceTypeTypeChargingStation nur DeviceTypeChargingStation?

@DerAndereAndi
Copy link
Member Author

@taimo42 Hmm... laut XSD heisst der type DeviceTypeType, dann sollten die dazugehörigen Varianten imho auch so beginnen. Ansonsten passt die Zuordnung nicht mehr.

In networkmanagment.go Zeile 141 sieht man warum das so gemacht ist:

  DeviceType  *DeviceTypeType  `json:"deviceType,omitempty"`

Dann wird klar was ein type ist, und was ein field.

Würde ich also so lassen.

@taimo42
Copy link
Collaborator

taimo42 commented Apr 21, 2022

Ok, macht Sinn

@DerAndereAndi DerAndereAndi merged commit 671caab into dev Apr 21, 2022
@DerAndereAndi DerAndereAndi deleted the feature/refactor-enums branch April 21, 2022 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants