1
0
Fork 0
forked from mirrors/tar-split

verify: starts of a checking function

This commit is contained in:
Vincent Batts 2015-10-29 15:30:47 -04:00
parent 5c8d5cacba
commit 867071d1e5
4 changed files with 158 additions and 45 deletions

View file

@ -0,0 +1,31 @@
// +build ignore
package main
import (
"fmt"
"os"
verify "."
)
func main() {
for _, arg := range os.Args[1:] {
keys, err := verify.Listxattr(arg)
if err != nil {
fmt.Println(err)
continue
}
if len(keys) > 0 {
fmt.Printf("%s : %q\n", arg, keys)
for _, key := range keys {
buf, err := verify.Lgetxattr(arg, key)
if err != nil {
fmt.Printf(" ERROR: %s\n", err)
continue
}
fmt.Printf(" %s = %s\n", key, string(buf))
}
}
}
}