check: remove unused TarCheck(), for Compare()
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Vincent Batts
5 years ago
17 | 17 |
|
18 | 18 |
return Compare(dh, newDh, keywords)
|
19 | 19 |
}
|
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 | |
}
|
108 | 108 |
t.Fatal(err)
|
109 | 109 |
}
|
110 | 110 |
|
111 | |
res, err := TarCheck(tdh, dh, append(DefaultKeywords, "sha1"))
|
|
111 |
res, err := Compare(tdh, dh, append(DefaultKeywords, "sha1"))
|
112 | 112 |
if err != nil {
|
113 | 113 |
t.Fatal(err)
|
114 | 114 |
}
|
|
163 | 163 |
}
|
164 | 164 |
|
165 | 165 |
// Test the tar manifest against itself
|
166 | |
res, err = TarCheck(tdh, tdh, []Keyword{"sha1"})
|
|
166 |
res, err = Compare(tdh, tdh, []Keyword{"sha1"})
|
167 | 167 |
if err != nil {
|
168 | 168 |
t.Fatal(err)
|
169 | 169 |
}
|
|
179 | 179 |
if err != nil {
|
180 | 180 |
t.Fatal(err)
|
181 | 181 |
}
|
182 | |
res, err = TarCheck(tdh, dh, []Keyword{"sha1"})
|
|
182 |
res, err = Compare(tdh, dh, []Keyword{"sha1"})
|
183 | 183 |
if err != nil {
|
184 | 184 |
t.Fatal(err)
|
185 | 185 |
}
|
|
217 | 217 |
t.Fatal(err)
|
218 | 218 |
}
|
219 | 219 |
|
220 | |
res, err := TarCheck(tdh, tdh, []Keyword{"sha1"})
|
|
220 |
res, err := Compare(tdh, tdh, []Keyword{"sha1"})
|
221 | 221 |
if err != nil {
|
222 | 222 |
t.Fatal(err)
|
223 | 223 |
}
|