const ldigits … const udigits … const signed … const unsigned … type formatInfo … func (f *formatInfo) init(buf *bytes.Buffer) { … } // writePadding generates n bytes of padding. func (f *formatInfo) writePadding(n int) { … } // pad appends b to f.buf, padded on left (!f.minus) or right (f.minus). func (f *formatInfo) pad(b []byte) { … } // padString appends s to f.buf, padded on left (!f.minus) or right (f.minus). func (f *formatInfo) padString(s string) { … } // fmt_boolean formats a boolean. func (f *formatInfo) fmt_boolean(v bool) { … } // fmt_unicode formats a uint64 as "U+0078" or with f.sharp set as "U+0078 'x'". func (f *formatInfo) fmt_unicode(u uint64) { … } // fmt_integer formats signed and unsigned integers. func (f *formatInfo) fmt_integer(u uint64, base int, isSigned bool, digits string) { … } // truncate truncates the string to the specified precision, if present. func (f *formatInfo) truncate(s string) string { … } // fmt_s formats a string. func (f *formatInfo) fmt_s(s string) { … } // fmt_sbx formats a string or byte slice as a hexadecimal encoding of its bytes. func (f *formatInfo) fmt_sbx(s string, b []byte, digits string) { … } // fmt_sx formats a string as a hexadecimal encoding of its bytes. func (f *formatInfo) fmt_sx(s, digits string) { … } // fmt_bx formats a byte slice as a hexadecimal encoding of its bytes. func (f *formatInfo) fmt_bx(b []byte, digits string) { … } // fmt_q formats a string as a double-quoted, escaped Go string constant. // If f.sharp is set a raw (backquoted) string may be returned instead // if the string does not contain any control characters other than tab. func (f *formatInfo) fmt_q(s string) { … } // fmt_c formats an integer as a Unicode character. // If the character is not valid Unicode, it will print '\ufffd'. func (f *formatInfo) fmt_c(c uint64) { … } // fmt_qc formats an integer as a single-quoted, escaped Go character constant. // If the character is not valid Unicode, it will print '\ufffd'. func (f *formatInfo) fmt_qc(c uint64) { … } // fmt_float formats a float64. It assumes that verb is a valid format specifier // for strconv.AppendFloat and therefore fits into a byte. func (f *formatInfo) fmt_float(v float64, size int, verb rune, prec int) { … }