go-kong
go-kong copied to clipboard
rbac_user_service to add return status code
In this code it would be nice to update the func signature to something like:
func (s *RBACUserService) Get(ctx context.Context,
nameOrID *string,
) (*RBACUser, int, error) {
where int
is the status code returned from the kong api.
It makes handling of certain error scenarios when importing this library a lot easier to manage and tailor toward the importing application.
I'll add here that it's probably a good idea in this situation if accepted, that the status code or certain other pieces of the response body as an object are returned if desired.