Closed george-e-shaw-iv closed 6 years ago
The easiest thing to probably do is to just copy and paste those structs inside of the functions that use them and then just get rid of the file that contained them initially (pkg/api/user/user.go
) as we wouldn't need it at that point.
For reference look at the way pkg/api/user/shutdown.go
handles request data.
Severity level (1-10):
7
Files/Directories Involved:
pkg/api/user/*
Description:
The functions use two struct vars that are accessible in the package scope and they manipulate them in the package scope. I can already forsee a problem of two functions being called at relatively the same time and trying to manipulate those structs at the same time, resulting in lost data. So that needs to be addressed accordingly.
Personal Comments:
I don't know why I designed it that way in the first place..