1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-14 20:58:41 +00:00
Commit graph

10 commits

Author SHA1 Message Date
42b655d8ee
*.go: update to golangci-lint, and fix everything
install tools in the workflow actions
Also switch away from deprecated ioutil

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2023-10-23 21:59:44 -04:00
106c52de51
*_test.go: ignore cyclomatic complexity for test files
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-08 21:59:08 -04:00
6fb913af99
compare_test: remove unused code
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 23:19:47 -04:00
4bc25af053
*.go: spelling typos
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2022-04-03 22:29:36 -04:00
Aleksa Sarai
e22043cb86
walk: implement FsEval hooks
In certain circumstances (such as the manifest generation of a
filesystem as an unprivileged user) it is important to provide hooks
that override the default os.* implementation of filesystem-related
functions.

In order to avoid merging too much code from outside projects (such as
umoci) this is implemented by providing FsEval hooks to Walk() and
Check(). This allows for users of go-mtree to modify how filesystem
checks are done, without compromising the simplicity of go-mtree's code.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-14 16:26:31 +11:00
d857d58104 compare: make the test output more readable
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-12-08 08:26:05 -05:00
c0a5cb25ec
-d: exclude non-directories
Adding flag, and supporting functionality for exluding entries that are
non-directories

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-11-17 22:43:02 -05:00
4eec68be4b
*: make Keyword and KeyVal pervasive
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2016-11-17 21:38:01 -05:00
Aleksa Sarai
c4be8dfe32
compare: implement proper testing with tar
While the full testing is broken due to bugs in the tar DH generator, we
ignore known bugs in the tar generator to at least allow us to test some
of the other semantics of Compare.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-11-10 11:30:06 +11:00
Aleksa Sarai
26ff922da6
compare: implement mtree.DirectoryHierarchy comparisons
This is part of a patchset that refactors all of the checking logic into
comparison operations. Essentially, provide a Compare(...) function that
allows for two different manifests to be compared. Extra and missing
entries are supported in addition to the standard modified entry, and by
implementing as a manifest comparison there is no double-scanning of the
manifest source.

The main annoyance is that we have to also include tar_time handling,
which has not been abstracted inside keywords.go. This is a bit ugly
right now, but works fine for the moment.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-11-10 11:30:06 +11:00