Passing the parsers as an argument is very C-like and is not really as
idiomadic as just using methods (in my defence, I was still pretty green
when I wrote this code and I was trying to port some logic from C).
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
These error cases were already handled correctly, but we really should
have tests for them anyway. Now that we have proper error variables
declared we can also test for specific errors as well.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
This code was written before %w was added to Go, and there were a fair
few mistakes in the copy-pasted error code.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
testify makes most bog-standard test checks much easier to read and
maintain, and is quite widely used. It wasn't really well known back
when govis was first written, but the migration is fairly
straight-forward for most tests.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
govis is a reimplementation of vis(3) and unvis(3) specifically made to
be unicode aware. It was specifically rewritten to replace cvis and the
other go vis reimplementation we have in go-mtree.
Signed-off-by: Aleksa Sarai <asarai@suse.de>