Hey, I had a quick doubt, In https://github.com/amitshekhariitbhu/go-backend-clean-architecture/blob/main/internal/tokenutil/tokenutil.go both IsAuthorized and ExtractIDFromToken functions are doing almost the same token parsing and validation. Wouldn’t it be better to combine them into one function that verifies and returns claims or ID? Or is there a particular reason for keeping them separate?
Hey, I had a quick doubt, In
https://github.com/amitshekhariitbhu/go-backend-clean-architecture/blob/main/internal/tokenutil/tokenutil.gobothIsAuthorizedandExtractIDFromTokenfunctions are doing almost the same token parsing and validation. Wouldn’t it be better to combine them into one function that verifies and returns claims or ID? Or is there a particular reason for keeping them separate?