CircleCI-Public / circleci-yaml-language-server

The official language server for CircleCI YAML configuration files
Apache License 2.0
20 stars 18 forks source link

refactor: remove utils.FindInArray and replace with slices.Contains #292

Closed loderunner closed 5 months ago

loderunner commented 5 months ago

Description

This PR removes the helper function utils.FindInArray as this function can advantageously be replaced by slices.Index or slices.Contains from the stdlib.

Implementation details

Please take care of the boolean conditions. I tried to handle every case, but I might have flipped the logic in a few cases.