Documentation
¶
Index ¶
- Constants
- Variables
- func CreateTarGz(sourceDir, destPath string) error
- func DetectFormat(filename string) string
- func ExtractRegularFile(reader io.Reader, header *tar.Header, targetPath string) error
- func ExtractTarEntry(tarReader io.Reader, header *tar.Header, targetPath string) error
- func ExtractTarGz(tarballPath, destDir string) error
- func ExtractTargetFilesFromGemReader(r io.Reader, patterns []string) (map[string]string, error)
- func ExtractTargetFilesFromReader(r io.Reader, filename string, patterns []string) (map[string]string, error)
- func ExtractTargetFilesFromTarGzReader(r io.Reader, patterns []string) (map[string]string, error)
- func ExtractTargetFilesFromZipReader(r io.Reader, patterns []string) (map[string]string, error)
- func ExtractZipFile(f *zip.File, targetPath string) error
- func SanitizeTarPath(entryName, destDir string) (string, error)
- func SanitizeZipPath(entryName, destDir string) (string, error)
Constants ¶
View Source
const MaxFileSize = 100 * 1024 * 1024 // 100MB per file limit
View Source
const MaxTextFileSize = 1 * 1024 * 1024 // 1MB limit for text files
Variables ¶
View Source
var TargetPatterns = map[string][]string{
"npm": {"package/package.json"},
"pypi": {"**/setup.py"},
"rubygems": {"**/extconf.rb"},
}
Functions ¶
func CreateTarGz ¶
CreateTarGz creates a gzip-compressed tar archive from sourceDir at destPath. Symlinks and non-regular files are skipped for consistency with ExtractTarGz. Entry names are relative to sourceDir.
func DetectFormat ¶
func ExtractRegularFile ¶
func ExtractTarEntry ¶
func ExtractTarGz ¶
func SanitizeTarPath ¶
func SanitizeZipPath ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.