You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
format, _, err:=archives.Identify(ctx, archivePath, nil)
24
+
iferr!=nil {
25
+
returnfmt.Errorf("failed to identify tar compression format: %w", err)
26
+
}
27
+
28
+
extractor, ok:=format.(archives.Extractor)
29
+
if!ok {
30
+
returnfmt.Errorf("file format does not support extraction: %s", archivePath)
31
+
}
32
+
33
+
returnextractor.Extract(ctx, tarReader, visitor)
34
+
}
35
+
13
36
// ExtractGlobsFromTarToUniqueTempFile extracts paths matching the given globs within the given archive to a temporary directory, returning file openers for each file extracted.
0 commit comments