// See the respective function's documentation for details.
type FmtFlag int
-// TODO(gri) The ' ' flag is not used anymore in %-formats.
-// Eliminate eventually.
-
const ( // fmt.Format flag/prec or verb
FmtLeft FmtFlag = 1 << iota // '-'
FmtSharp // '#'
FmtSign // '+'
- FmtUnsigned // ' ' (historic: u flag)
+ FmtUnsigned // internal use only (historic: u flag)
FmtShort // verb == 'S' (historic: h flag)
FmtLong // verb == 'L' (historic: l flag)
FmtComma // '.' (== hasPrec) (historic: , flag)
flag |= FmtSign
}
if s.Flag(' ') {
- flag |= FmtUnsigned
+ Fatalf("FmtUnsigned in format string")
}
if _, ok := s.Precision(); ok {
flag |= FmtComma
// "%L" print definition, not name
// "%S" omit 'func' and receiver from function types, short type names
-// "% v" package name, not prefix (FTypeId mode, sticky)
func (t *Type) Format(s fmt.State, verb rune) {
switch verb {
case 'v', 'S', 'L':