posit-dev / publisher

MIT License
5 stars 1 forks source link

Return empty array instead of nil #2042

Closed mmarchetti closed 3 months ago

mmarchetti commented 3 months ago

Intent

Fixes #2032

Type of Change

Approach

There are a number of places in the Go code where we return nil when a result set would be empty. This PR changes those to return an empty slice. We only return nil on error returns, where the slice value won't be used by the caller.

Automated Tests

Existing tests should pass.

Directions for Reviewers

Open an empty folder, and try to add a deployment.