-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
POC
package main
import (
"archive/tar"
"fmt"
"io"
"log"
"os"
)
func main() {
file, err := os.Open(os.Args[1])
if err != nil {
os.Exit(1)
}
// Open and iterate through the files in the archive.
tr := tar.NewReader(file)
for {
hdr, err := tr.Next()
if err == io.EOF {
break // End of archive
}
if err != nil {
log.Fatal(err)
}
fmt.Printf("Found %s:\n", hdr.Name)
fmt.Printf("Header %#+v:\n", hdr)
}
}Metadata
Metadata
Assignees
Labels
No labels