From d71b1c3dcc2039f44fb2e3f271997ee260e6685b Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 28 Nov 2022 11:01:36 -0500 Subject: [PATCH] archive/tar: use proper doc comment for Deprecated notes End-of-line comments are not doc comments, so Deprecated notes in them are not recognized as deprecation notices. Rewrite the comments. Change-Id: Idb19603d7fc2ec8e3a2f74bacb74fbbec5583d20 Reviewed-on: https://go-review.googlesource.com/c/go/+/453615 TryBot-Result: Gopher Robot Auto-Submit: Russ Cox Run-TryBot: Russ Cox Reviewed-by: Joseph Tsai Reviewed-by: Ian Lance Taylor --- api/go1.16.txt | 1 + src/archive/tar/common.go | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/api/go1.16.txt b/api/go1.16.txt index 8f9ca55ccd..11400965d1 100644 --- a/api/go1.16.txt +++ b/api/go1.16.txt @@ -500,6 +500,7 @@ pkg unicode, var Dives_Akuru *RangeTable pkg unicode, var Khitan_Small_Script *RangeTable pkg unicode, var Yezidi *RangeTable # all deprecations up to and including Go 1.16 +pkg archive/tar, const TypeRegA //deprecated pkg archive/tar, type Header struct, Xattrs //deprecated pkg archive/zip, method (*File) ModTime //deprecated pkg archive/zip, method (*File) SetModTime //deprecated diff --git a/src/archive/tar/common.go b/src/archive/tar/common.go index 0d5a942024..38216ac13f 100644 --- a/src/archive/tar/common.go +++ b/src/archive/tar/common.go @@ -59,8 +59,10 @@ func (he headerError) Error() string { // Type flags for Header.Typeflag. const ( // Type '0' indicates a regular file. - TypeReg = '0' - TypeRegA = '\x00' // Deprecated: Use TypeReg instead. + TypeReg = '0' + + // Deprecated: Use TypeReg instead. + TypeRegA = '\x00' // Type '1' to '6' are header-only flags and may not have a data body. TypeLink = '1' // Hard link -- 2.50.0