TUM-Dev / gocast

TUMs lecture streaming service.
https://live.rbg.tum.de/
MIT License
177 stars 41 forks source link

All methods on models as pointer receivers #1325

Open Mjaethers opened 5 months ago

Mjaethers commented 5 months ago

Motivation and Context

Fixes #1272. In the model package many structs have methods on both value and pointer receivers. Having mixed receivers is for consistencies sake not ideal, but since many of these structs are also quite large, and using value receivers implies copying data, using pointer receivers would be slightly more performant.

Description

Any value receivers were changed to pointer receivers, usually this was as simple as changing the signature. Any superfluous receivers were also removed.

Steps for Testing

Nothing should have changed.

Screenshots

github-actions[bot] commented 5 months ago

Your Testserver will be ready at https://1325.test.live.mm.rbg.tum.de in a few minutes.

Logins | Kurs1 | Kurs2 | Kurs3 | Kurs4 | | ---------------------------------------- | ------------------------- | ------------------------- | ------------------------- | | public | public | loggedin | enrolled | | prof1 | prof1 | prof2 | prof1
prof2 | | student1
student2
student3 | student1
student2 | student2
student3 | student1
student2 |