From bacbea465f264f8b3adf90ecc76f58360b975cb5 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Mon, 11 Jul 2016 17:09:14 -0400 Subject: [PATCH] Return "link" keyword along with its value Originally only returning `Sys.linkname` when evaluating a tar header's link field. We want it to be in the form of keyword=value instead. Signed-off-by: Stephen Chung --- keywords.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keywords.go b/keywords.go index 8e199ce..f629519 100644 --- a/keywords.go +++ b/keywords.go @@ -206,7 +206,7 @@ var ( } linkKeywordFunc = func(path string, info os.FileInfo, r io.Reader) (string, error) { if sys, ok := info.Sys().(*tar.Header); ok { - return sys.Linkname, nil + return fmt.Sprintf("link=%s", sys.Linkname), nil } if info.Mode()&os.ModeSymlink != 0 {