sensu / sensu-plugin-sdk

A framework for creating Sensu plugins
MIT License
7 stars 8 forks source link

Add Allow and Restrict to PluginConfigOptionValue #72

Closed echlebek closed 2 years ago

echlebek commented 2 years ago

This commit allows Allow and Restrict fields to PluginConfigOptionValue. The purpose of these fields is to facilitate a uniform method of simple option validation through equality testing. The equality testing is provided via go-cmp. The zero values of Allow and Restrict result in the same behaviour as before they were added, so this change is backwards-compatible.

Signed-off-by: Eric Chlebek eric@sensu.io

Note to reviewers: this change was based on another change still in a branch, so it will be rebased on master after the "refactorin" PR is merged.