*: include the original source and a go mod

This is a silly thing from Jun 29 2016 just to view the TAR headers

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2020-03-04 09:52:45 -05:00
parent 11e6b4b2bc
commit a377d29cf7
Signed by: vbatts
GPG Key ID: 10937E57733F1362
2 changed files with 26 additions and 0 deletions

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module git.thisco.de/vbatts/tarinfo
go 1.13

23
main.go Normal file
View File

@ -0,0 +1,23 @@
package main
import (
"archive/tar"
"fmt"
"log"
"os"
)
func main() {
fh, err := os.Open(os.Args[1])
if err != nil {
log.Fatal(err)
}
tr := tar.NewReader(fh)
for {
hdr, err := tr.Next()
if err != nil {
break
}
fmt.Printf("%#v\n", hdr)
}
}