xmidt-org / svalinn

The shield to protect our users from incoming events. Part of codex.
Apache License 2.0
1 stars 7 forks source link

request parser becoming more and more complex #138

Closed kristinapathak closed 2 years ago

kristinapathak commented 4 years ago

https://github.com/xmidt-org/svalinn/blob/0f38970ab188c2fdee7265fbd24db51bd5d44db5/requestParser/requestParser.go#L187 https://github.com/xmidt-org/svalinn/blob/0f38970ab188c2fdee7265fbd24db51bd5d44db5/requestParser/requestParser.go#L64

The parseRequest() function is getting pretty long, and then the struct itself seems pretty complex, with many dependencies. It would be helpful to try to split up this functionality in some way to help decrease the complexity and make it easier to maintain.