aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorqiulaidongfeng <2645477756@qq.com>2024-03-15 10:40:23 +0000
committerCherry Mui <cherryyz@google.com>2024-03-15 16:01:50 +0000
commitd838e4dcdf89124ed051e1c53e8472e900664a6b (patch)
tree391b301a77fd1a5579cbe8bbcf59815dcd293a1d /doc
parent49204af37efb819bf22f720f27adadfb9b6238fc (diff)
downloadgo-d838e4dcdf89124ed051e1c53e8472e900664a6b.tar.gz
go-d838e4dcdf89124ed051e1c53e8472e900664a6b.zip
archive/tar: add FileInfoNames interface
An optional interface FileInfoNames has been added. If the parameter fi of FileInfoHeader implements the interface the Gname/Uname of the return value Header are provided by the method of the interface. Also added testing. Fixes #50102 Change-Id: I47976e238eb20ed43113b060e4f83a14ae49493e GitHub-Last-Rev: a213613c79e150d52a2f5c84dca7a49fe123fa40 GitHub-Pull-Request: golang/go#65273 Reviewed-on: https://go-review.googlesource.com/c/go/+/558355 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/next/6-stdlib/99-minor/archive/tar/50102.md3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/next/6-stdlib/99-minor/archive/tar/50102.md b/doc/next/6-stdlib/99-minor/archive/tar/50102.md
new file mode 100644
index 0000000000..be5592bc05
--- /dev/null
+++ b/doc/next/6-stdlib/99-minor/archive/tar/50102.md
@@ -0,0 +1,3 @@
+If the argument to [`FileInfoHeader`](/archive/tar#FileInfoHeader) implements the new [`FileInfoNames`](/archive/tar#FileInfoNames) interface,
+then the interface methods will be used to set the Uname/Gname of the file header.
+This allows applications to override the system-dependent Uname/Gname lookup.