1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-10-04 04:31:00 +00:00
Commit graph

9 commits

Author SHA1 Message Date
Aleksa Sarai
01d93a93e2
unvis: make Next return chars and add Step helper
This makes it a little easier to read the common case code which
consumes the token and helps highlight which sub-parsers are explicitly
not consuming tokens until we are sure we are using it.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-09-23 04:40:21 +10:00
Aleksa Sarai
9bd1dffd9b
unvis: switch to methods for parser
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>
2025-09-23 04:40:18 +10:00
Aleksa Sarai
bcdb71fb56
unvis: add some more error tests
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>
2025-09-23 04:40:15 +10:00
Aleksa Sarai
fbada2e081
govis: modernise errors
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>
2025-09-23 04:15:07 +10:00
Aleksa Sarai
3ce83fca15
govis: add SPDX license tag
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
2025-09-23 04:14:37 +10:00
Aleksa Sarai
d02f298ad4
govis: switch to testify tests
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>
2025-09-23 04:13:42 +10:00
04230dccdc
govis: comment for lint
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2017-06-30 15:06:50 -04:00
Aleksa Sarai
4ad871ca46
pkg: govis: remove travis-ci files
Since govis is now a subpackage, drop references to the project as a
govis package.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-02-16 05:18:02 +11:00
Aleksa Sarai
91d7ec8c89
subtree merge: cyphar/govis
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>
2017-02-16 03:08:51 +11:00