refactor(validate): Fix a few readability/coding style issues.
- Migrate from the deprecated
ioutil.ReadFile()
toos.ReadFile()
. (https://go.dev/doc/go1.16#ioutil) - Improve error messages produces by the
APIVersion()
method. E.g. print the actual and expected type. - Make
APIVersion()
a method of theManifest
type. Drop the "Get" prefix. (https://google.github.io/styleguide/go/decisions#getters) - Clearly separate reading the API version and constructing the schema path. (single responsibility)
Issue: team#56 (closed)