In plugin/api.go, we document the minimum required server version to use an API, e.g.:
This means that the API was first added to Mattermost 5.8, and simply won't be available in earlier versions.
Let's add a build-check that ensures this comment is present and well formatted as the last comment prior to all methods on the API interface. Methods without an explicit comment are implicitly supported in Mattermost 5.2 and later and should be updated as part of this ticket to be explicit. Once this issue is resolved, new API methods without a well-formed minimum server version comment should fail the build.
Use Go reflection to solve this problem. Do not rely on grep.