@@ -17,6 +17,9 @@ import (
17
17
// See the respective function's documentation for details.
18
18
type FmtFlag int
19
19
20
+ // TODO(gri) The ' ' flag is not used anymore in %-formats.
21
+ // Eliminate eventually.
22
+
20
23
const ( // fmt.Format flag/prec or verb
21
24
FmtLeft FmtFlag = 1 << iota // '-'
22
25
FmtSharp // '#'
@@ -1556,6 +1559,7 @@ func (n *Node) nodedump(s fmt.State, flag FmtFlag) {
1556
1559
}
1557
1560
}
1558
1561
1562
+ // "%S" suppresses qualifying with package
1559
1563
func (s * Sym ) Format (f fmt.State , verb rune ) {
1560
1564
switch verb {
1561
1565
case 'v' , 'S' :
@@ -1570,7 +1574,7 @@ func (s *Sym) String() string {
1570
1574
return s .sconv (0 )
1571
1575
}
1572
1576
1573
- // "%S" suppresses qualifying with package
1577
+ // See #16897 before changing the implementation of sconv.
1574
1578
func (s * Sym ) sconv (flag FmtFlag ) string {
1575
1579
if flag & FmtLong != 0 {
1576
1580
panic ("linksymfmt" )
@@ -1671,6 +1675,9 @@ func Fldconv(f *Field, flag FmtFlag) string {
1671
1675
return str
1672
1676
}
1673
1677
1678
+ // "%L" print definition, not name
1679
+ // "%S" omit 'func' and receiver from function types, short type names
1680
+ // "% v" package name, not prefix (FTypeId mode, sticky)
1674
1681
func (t * Type ) Format (s fmt.State , verb rune ) {
1675
1682
switch verb {
1676
1683
case 'v' , 'S' , 'L' :
@@ -1681,9 +1688,7 @@ func (t *Type) Format(s fmt.State, verb rune) {
1681
1688
}
1682
1689
}
1683
1690
1684
- // "%L" print definition, not name
1685
- // "%S" omit 'func' and receiver from function types, short type names
1686
- // "% v" package name, not prefix (FTypeId mode, sticky)
1691
+ // See #16897 before changing the implementation of tconv.
1687
1692
func (t * Type ) tconv (flag FmtFlag ) string {
1688
1693
if t == nil {
1689
1694
return "<T>"
0 commit comments