make OCI RFC error guardian easier ...
This tool is much like i18n project, 'make update-po' will parse the codes and generate a po file. If a new translation string was detected, the po file will updated either.
We provide two demo files:
testdata/error.go
is an old version ofspecerror/error.go
file inopencontainers/runtime-tool
project.testdata/config.md
is a new version ofconfig.md
file inopencontainers/runtime-spec
project. We assume that it is updated, so there are some RFC errors missing inerror.go
Then we can run
go build
./markdown-to-json testdata/config.md > config.go
We got two RFC code updated: SpecificationVersionOciVersion
and Extensibility
.
So now, as the runtime-tool developer, we need to modify them by using a suitable variable name and remove the TODO
lines.
Don't forget to update the real runtime validation code.
Then we can
mv b ${yourpath}/runtime-tool/specerror/error.go
git add ${yourpath}/runtime-tool/specerror/error.go
git commit .. ; git push
Now we are done!
- update I did not check the new version, so the update function is not tested. If we find there is update, we can add 'icon' and mark there is an update.
- percentage for example, if we support 40% RFC codes, we can tell and add to icon just like UT coverage.