Currently, Validate and ValidateWithContext always returns a result with status Empty and a missing 'kind' key error as the final item in the returned slice.
This is because ValidateWithContext currently will parse the output of resourcesChan, even when the context is finished and we get back a default Resource struct.
This PR modifies the code to skip validating this case.
Currently, Validate and ValidateWithContext always returns a result with status
Empty
and amissing 'kind' key
error as the final item in the returned slice.This is because ValidateWithContext currently will parse the output of
resourcesChan
, even when the context is finished and we get back a defaultResource
struct.This PR modifies the code to skip validating this case.