Codebase list golang-github-vbatts-go-mtree / 40f4ce8
check: remove unused TarCheck(), for Compare() Signed-off-by: Vincent Batts <vbatts@hashbangbash.com> Vincent Batts 5 years ago
2 changed file(s) with 4 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
1717
1818 return Compare(dh, newDh, keywords)
1919 }
20
21 // TarCheck is the tar equivalent of checking a file hierarchy spec against a
22 // tar stream to determine if files have been changed. This is precisely
23 // equivalent to Compare(dh, tarDH, keywords).
24 func TarCheck(tarDH, dh *DirectoryHierarchy, keywords []Keyword) ([]InodeDelta, error) {
25 if keywords == nil {
26 return Compare(dh, tarDH, dh.UsedKeywords())
27 }
28 return Compare(dh, tarDH, keywords)
29 }
108108 t.Fatal(err)
109109 }
110110
111 res, err := TarCheck(tdh, dh, append(DefaultKeywords, "sha1"))
111 res, err := Compare(tdh, dh, append(DefaultKeywords, "sha1"))
112112 if err != nil {
113113 t.Fatal(err)
114114 }
163163 }
164164
165165 // Test the tar manifest against itself
166 res, err = TarCheck(tdh, tdh, []Keyword{"sha1"})
166 res, err = Compare(tdh, tdh, []Keyword{"sha1"})
167167 if err != nil {
168168 t.Fatal(err)
169169 }
179179 if err != nil {
180180 t.Fatal(err)
181181 }
182 res, err = TarCheck(tdh, dh, []Keyword{"sha1"})
182 res, err = Compare(tdh, dh, []Keyword{"sha1"})
183183 if err != nil {
184184 t.Fatal(err)
185185 }
217217 t.Fatal(err)
218218 }
219219
220 res, err := TarCheck(tdh, tdh, []Keyword{"sha1"})
220 res, err := Compare(tdh, tdh, []Keyword{"sha1"})
221221 if err != nil {
222222 t.Fatal(err)
223223 }